Provides timers.
More...
#include <clock.hpp>
Enumerator |
---|
SAFE |
Don't update Clock for a process if going backwards in time.
|
FORCE |
Update Clock even if going backwards in time.
|
static void process::Clock::advance |
( |
const Duration & |
duration | ) |
|
|
static |
static bool process::Clock::cancel |
( |
const Timer & |
timer | ) |
|
|
static |
static void process::Clock::finalize |
( |
| ) |
|
|
static |
Clears all timers without executing them.
The process manager must be properly finalized before the clock is finalized. This will eliminate the need for timers to activate and prevent further timers from being added after finalization.
Also, the Clock must not be paused when finalizing.
static void process::Clock::initialize |
( |
lambda::function< void(const std::list< Timer > &)> && |
callback | ) |
|
|
static |
Initialize the clock with the specified callback that will be invoked whenever a batch of timers has expired.
static Time process::Clock::now |
( |
| ) |
|
|
static |
The current clock time for either the current process that makes this call or the global clock time if not invoked from a process.
- Returns
- This process' current clock time or the global clock time if not invoked from a process.
static void process::Clock::pause |
( |
| ) |
|
|
static |
Pauses the clock e.g.
for testing purposes.
static bool process::Clock::paused |
( |
| ) |
|
|
static |
Check whether clock is currently running.
static void process::Clock::resume |
( |
| ) |
|
|
static |
static void process::Clock::settle |
( |
| ) |
|
|
static |
static bool process::Clock::settled |
( |
| ) |
|
|
static |
static Timer process::Clock::timer |
( |
const Duration & |
duration, |
|
|
const lambda::function< void()> & |
thunk |
|
) |
| |
|
static |
static void process::Clock::update |
( |
const Time & |
time | ) |
|
|
static |
The documentation for this class was generated from the following file:
- 3rdparty/libprocess/include/process/clock.hpp