Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.309 kb
#include <stdint.h>
#include <stdlib.h>
#include <sys/time.h>
#include "dat.h"
int64
nanoseconds(void)
{
int r;
struct timeval tv;
r = gettimeofday(&tv, 0);
if (r != 0) return warnx("gettimeofday"), -1; // can't happen
return ((int64)tv.tv_sec)*1000000000 + ((int64)tv.tv_usec)*1000;
}
Jump to Line
Something went wrong with that request. Please try again.