mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-17 16:38:14 +03:00
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;
|
|
}
|