|
SimGrid
3.14.159
Versatile Simulation of Distributed Systems
|
A C++ compatible TrivialClock working with simulated-time.
SimGrid uses double for representing the simulated time, where durations are expressed in seconds (with infinite duration expressed as a negative value) and timepoints are expressed as seconds from the beginning of the simulation. In contrast, all the C++ APIs use the much more sensible std::chrono::duration andstd::chrono::time_point.
This class can be used to build std::chrono objects that use simulated time, using SimulationClockDuration and SimulationClockTimePoint.
This means it is possible to use (since C++14):
#include <chrono.hpp>
Public Types | |
| using | rep = double |
| using | period = std::ratio< 1 > |
| using | duration = std::chrono::duration< rep, period > |
| using | time_point = std::chrono::time_point< SimulationClock, duration > |
Static Public Member Functions | |
| static time_point | now () |
Static Public Attributes | |
| static constexpr bool | is_steady = true |
| using simgrid::SimulationClock::rep = double |
| using simgrid::SimulationClock::period = std::ratio<1> |
| using simgrid::SimulationClock::duration = std::chrono::duration<rep, period> |
| using simgrid::SimulationClock::time_point = std::chrono::time_point<SimulationClock, duration> |
|
inlinestatic |
|
static |