mirror of
https://github.com/nasa/trick.git
synced 2024-12-20 21:53:10 +00:00
Merge branch 'master' of https://github.com/cherpin00/trick
This commit is contained in:
commit
8cc1b0cbd7
@ -117,12 +117,9 @@ TEST_F(GetTimeOfDayClockTest, ClockSpin) {
|
|||||||
|
|
||||||
dClk.clock_spin(tim_curr + spin_time);
|
dClk.clock_spin(tim_curr + spin_time);
|
||||||
|
|
||||||
// I think we have to account for a race condition between
|
|
||||||
// wall_clock_time() and the execution time of this test code. (J.Penn)
|
|
||||||
// We know that the time difference must be at least as long as the spin_time.
|
// We know that the time difference must be at least as long as the spin_time.
|
||||||
|
// But that's all we know.
|
||||||
EXPECT_GE((timclk->wall_clock_time() - tim_curr), spin_time);
|
EXPECT_GE((timclk->wall_clock_time() - tim_curr), spin_time);
|
||||||
// But, it can't be much longer. Allow 10 micro-seconds to allow for code execution time.
|
|
||||||
EXPECT_LE((timclk->wall_clock_time() - tim_curr), spin_time+10);
|
|
||||||
|
|
||||||
delete timclk;
|
delete timclk;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user