mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-08 21:57:42 +03:00
e1e80e2b81
Under POSIX clock_gettime and timespec are defined in time.h I don't think we need sys/time.h
8 lines
167 B
C
8 lines
167 B
C
#include <time.h>
|
|
|
|
double get_MINUS_time_MINUS_elapsed() {
|
|
struct timespec tv;
|
|
clock_gettime(CLOCK_REALTIME, &tv);
|
|
return 1000000000 * tv.tv_sec + tv.tv_nsec;
|
|
}
|