Fixes #61. Failure in test-hrtime
This commit is contained in:
parent
4eb06151bd
commit
6eefdaf966
@ -23,6 +23,10 @@
|
||||
#include "task.h"
|
||||
|
||||
|
||||
/*
|
||||
* We expect the amount of time passed to be at least one us plus two system
|
||||
* calls. Therefore checking that at least a microsecond has elapsed is safe.
|
||||
*/
|
||||
TEST_IMPL(hrtime) {
|
||||
uint64_t a, b, diff;
|
||||
|
||||
@ -33,5 +37,7 @@ TEST_IMPL(hrtime) {
|
||||
diff = b - a;
|
||||
|
||||
printf("diff = %llu\n", diff);
|
||||
ASSERT(b - a >= NANOSEC / MILLISEC);
|
||||
|
||||
ASSERT(diff >= NANOSEC / MICROSEC);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user