Use absolute offset in #190, fix case 1

This commit is contained in:
Wolfgang Hommel
2019-05-03 16:03:13 +02:00
parent 7bc0d5044f
commit 9846eceb10

View File

@@ -2241,7 +2241,7 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp)
#ifdef CLOCK_REALTIME_COARSE
case CLOCK_REALTIME_COARSE:
#endif
if ((tp->tv_sec < ftpl_starttime.real.tv_sec) ||
if ((tp->tv_sec > ftpl_starttime.real.tv_sec) ||
((tp->tv_sec == ftpl_starttime.real.tv_sec) &&
(tp->tv_nsec > ftpl_starttime.real.tv_nsec))) {
timespecsub(tp, &ftpl_starttime.real, &tdiff);