Helper to count the seconds of a duration/time_point.
Synopsis
Declared in <util/time.h>
template<
typename Dur1,
typename Dur2>
constexpr
auto
Ticks(Dur2 d);
Description
All durations/time_points should be using std::chrono and calling this should generally be avoided in code. Though, it is still preferred to an inline t.count() to protect against a reliance on the exact type of t.
This helper is used to convert durations/time_points before passing them over an interface that doesn't support std::chrono (e.g. RPC, debug log, or the GUI)
Return Value
The tick count of d expressed in the Dur1 units.
Parameters
Name |
Description |
d |
Duration to convert. |
Created with MrDocs