Files
Compsys-2021-Assignments/A1/timing.h
2021-09-29 15:23:58 +02:00

13 lines
209 B
C

#ifndef TIMING_H
#define TIMING_H
#include <sys/time.h>
static uint64_t microseconds() {
static struct timeval t;
gettimeofday(&t, NULL);
return ((uint64_t)t.tv_sec*1000000)+t.tv_usec;
}
#endif