Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
FakeClock.cxx
Go to the documentation of this file.
1
36
#include "
os/FakeClock.hxx
"
37
38
#ifdef GTEST
39
40
extern
"C"
41
{
42
43
long
long
os_get_fake_time
(
void
)
44
{
45
if
(
FakeClock::exists
())
46
{
47
return
FakeClock::instance
()->
get_time_nsec
();
48
}
49
else
50
{
51
return
-1;
52
}
53
}
54
55
}
// extern C
56
57
#endif
// GTEST
FakeClock.hxx
FakeClock::get_time_nsec
long long get_time_nsec()
Definition
FakeClock.hxx:86
Singleton< FakeClock >::instance
static FakeClock * instance()
Definition
Singleton.hxx:77
Singleton< FakeClock >::exists
static bool exists()
Definition
Singleton.hxx:83
os_get_fake_time
long long os_get_fake_time(void)
Get the fake time for a unit test.
src
os
FakeClock.cxx
Generated on Sun Feb 2 2025 21:18:14 for Open Model Railroad Network (OpenMRN) by
1.9.8