List of all members.
Public Member Functions |
| MockTimer (int64 time_ms) |
void | SetTimeUs (int64 new_time_us) |
void | SetTimeMs (int64 new_time_ms) |
void | AdvanceUs (int64 delta_us) |
| Advance forward time by the specified number of microseconds.
|
void | AdvanceMs (int64 delta_ms) |
| Advance time, in milliseconds.
|
void | SetTimeDeltaUs (int64 delta_us) |
| Set time advances in microseconds for the next calls to NowUs/NowMs.
|
void | SetTimeDeltaMs (int64 delta_ms) |
| Set time advances in milliseconds for the next calls to NowUs/NowMs.
|
virtual int64 | NowUs () const |
| Returns number of microseconds since 1970.
|
virtual void | SleepUs (int64 us) |
| Sleep for given number of microseconds.
|
virtual void | SleepMs (int64 ms) |
| Sleep for given number of milliseconds.
|
void | set_mutex (AbstractMutex *mutex) |
Static Public Attributes |
static const int64 | kApr_5_2010_ms |
| A useful recent time-constant for testing.
|
Member Function Documentation
By default, mutex_ is a NullMutex and so MockTimer is only suitable for single-threaded systems. To use in a multi-threaded system, create a mutex for MockTimer to use. This transfers ownership.
Sets the time as in microseconds, calling any outstanding alarms with wakeup times up to and including time_us.
The documentation for this class was generated from the following file: