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:
Sebastian Huber
2018-12-05 10:03:13 +01:00
parent 03e86553d2
commit 9921ab6973

View File

@@ -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" );