wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

nsec.c (251B)


      1 /* Written by Kris Maglione <maglione.k at Gmail> */
      2 /* Public domain */
      3 #include "util.h"
      4 #include <sys/time.h>
      5 
      6 uvlong
      7 nsec(void) {
      8 	struct timeval tv;
      9 
     10 	gettimeofday(&tv, nil);
     11 	return (uvlong)tv.tv_sec * 1000000000 + (uvlong)tv.tv_usec * 1000;
     12 }
     13