11 lines
258 B
C
11 lines
258 B
C
|
#include "../include/time.h"
|
||
|
#include <time.h>
|
||
|
|
||
|
double clock_get_monotonic_seconds() {
|
||
|
struct timespec ts;
|
||
|
ts.tv_sec = 0;
|
||
|
ts.tv_nsec = 0;
|
||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||
|
return (double)ts.tv_sec + (double)ts.tv_nsec * 0.000000001;
|
||
|
}
|