gpu-screen-recorder/src/time.c

11 lines
258 B
C
Raw Normal View History

#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;
}