Simulation time source. This class is an utility to provide a generic time source for time in a simulated environment. It can be restarted at an arbitrary time with an arbitrary offset. It will then read the current real system time and save the initial offset. Each time you query the time source it will return a given fixed time. The time is advanced by setting a new offset (usually in every cycle).
This implementation is rather primitive at the moment and could use some love.
- Author
- Tim Niemueller
Definition at line 38 of file simts.h.
timeval fawkes::SimulatorTimeSource::conv_native_to_exttime |
( |
const timeval * |
tv | ) |
const |
|
virtual |
Convert a native time to the external time.
When communicating with another instance which provides times in some timeformat native to the underlying time source (e.g. received from a simulation) it must be converted to a Fawkes time.
- Parameters
-
tv | time in external time source native format |
- Returns
- time in Fawkes comparable to other times generated using the external timesource.
Implements fawkes::TimeSource.
Definition at line 95 of file simts.cpp.
References fawkes::Clock::get_systime().