#include <hikogui/time/time_stamp_utc.hpp>
|
static utc_nanoseconds | now (time_stamp_count &tsc) |
| Get the current time and TSC value.
|
|
static utc_nanoseconds | make (time_stamp_count const &tsc) noexcept |
| Make a time point from a time stamp count.
|
|
static bool | start_subsystem () noexcept |
| This will start the calibration subsystem.
|
|
static void | stop_subsystem () noexcept |
| This will stop the calibration subsystem.
|
|
static void | adjust_for_drift () noexcept |
| A calibration step which will drift the per-cpu tsc-offset.
|
|
◆ adjust_for_drift()
static void v1::time_stamp_utc::adjust_for_drift |
( |
| ) |
|
|
staticnoexcept |
A calibration step which will drift the per-cpu tsc-offset.
This is a fast wait-free function that may be called from any thread. It is useful to call this from the render thread which means small adjustments to the calibrations are made at 60 fps.
◆ make()
Make a time point from a time stamp count.
This function will work in two modes:
- subsystem off: Uses now() and the time_stamp_count frequency to estimate a timepoint from the given tsc.
- subsystem on: Uses the calibrated TSC offset and more accurate frequency to estimate a timepoint from the given tsc. this is much faster and a lot more accurate.
◆ now()
Get the current time and TSC value.
- Precondition
- Use
set_thread_affinity()
to set the CPU affinity to a single CPU.
◆ start_subsystem()
static bool v1::time_stamp_utc::start_subsystem |
( |
| ) |
|
|
inlinestaticnoexcept |
This will start the calibration subsystem.
◆ stop_subsystem()
static void v1::time_stamp_utc::stop_subsystem |
( |
| ) |
|
|
inlinestaticnoexcept |
This will stop the calibration subsystem.
The documentation for this struct was generated from the following file: