forked from Imagelibrary/rtems
psxtimes01: Fix sporadic failures
It is not enough to just wait for at least the first clock tick to get non-zero times. In _times() we round down, so the uptime must be greater than or equal to the clock tick interval. We do not know when the timecounter is started during the system initialization. We have to wait until at least two ticks happened.
This commit is contained in:
@@ -48,7 +48,7 @@ rtems_task Init(
|
||||
rtems_test_assert( sc == -1 );
|
||||
rtems_test_assert( errno == EFAULT );
|
||||
|
||||
while ( rtems_clock_get_ticks_since_boot() == 0 )
|
||||
while ( rtems_clock_get_ticks_since_boot() <= 2 )
|
||||
;
|
||||
|
||||
puts( "_times( &start_tm ) -- OK" );
|
||||
|
||||
Reference in New Issue
Block a user