wmii/lib/libstuff/util/nsec.c

14 lines
251 B
C
Raw Normal View History

/* Written by Kris Maglione <maglione.k at Gmail> */
/* Public domain */
#include "util.h"
#include <sys/time.h>
uvlong
nsec(void) {
struct timeval tv;
gettimeofday(&tv, nil);
2010-06-05 02:15:11 +04:00
return (uvlong)tv.tv_sec * 1000000000 + (uvlong)tv.tv_usec * 1000;
}