libprelude/libprelude-5.2.0-fix_prelude_tests_timer.patch
2020-09-17 23:09:58 +02:00

13 lines
529 B
Diff

--- ./tests/prelude-timer.c 2016-09-15 08:49:10.810000884 +0200
+++ ./tests/prelude-timer.c 2017-05-16 07:18:40.763829280 +0200
@@ -31,7 +31,8 @@
test_timer_t *timer = data;
unsigned int elapsed = time(NULL) - timer->start_time;
- assert(elapsed == prelude_timer_get_expire(&timer->timer));
+ assert(elapsed >= prelude_timer_get_expire(&timer->timer));
+ assert(elapsed <= prelude_timer_get_expire(&timer->timer)+1);
prelude_timer_destroy(&timer->timer);
free(timer);