use monotonic clock instead of system clock, allow calibration of any stream source and not just video4linux devices

This commit is contained in:
c0ntrol
2020-07-07 21:38:45 +02:00
parent 8965d18cd6
commit a16d153ad8
11 changed files with 178 additions and 216 deletions

View File

@@ -58,7 +58,7 @@ static void net_delay(long ms, long sec )
struct timespec ts;
ts.tv_sec = sec;
ts.tv_nsec = MS_TO_NANO( ms );
clock_nanosleep( CLOCK_REALTIME,0, &ts, NULL );
clock_nanosleep( CLOCK_MONOTONIC,0, &ts, NULL );
}
static int my_screen_id = -1;