Mike Miller 2016-01-17 20:19:40 +00:00
commit 94877f2c61
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -152,9 +152,10 @@ static void underrun_test(unsigned char *buf, uint32_t len, int mute)
static int ppm_gettime(struct time_generic *tg)
{
int rv = ENOSYS;
struct timespec ts;
#ifdef __unix__
struct timespec ts;
rv = clock_gettime(CLOCK_MONOTONIC, &ts);
tg->tv_sec = ts.tv_sec;
tg->tv_nsec = ts.tv_nsec;
@ -162,8 +163,8 @@ static int ppm_gettime(struct time_generic *tg)
struct timeval tv;
rv = gettimeofday(&tv, NULL);
ts->tv_sec = tv.tv_sec;
ts->tv_nsec = tv.tv_usec * 1000;
tg->tv_sec = tv.tv_sec;
tg->tv_nsec = tv.tv_usec * 1000;
#endif
return rv;
}