[#Ticks]
= Ticks
:mrdocs:

Helper to count the seconds of a duration&sol;time&lowbar;point&period;

== Synopsis

Declared in `&lt;util&sol;time&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Dur1,
    typename Dur2&gt;
constexpr
auto
Ticks(Dur2 d);
----

== Description

All durations&sol;time&lowbar;points should be using std&colon;&colon;chrono and calling this should generally be avoided in code&period; Though, it is still preferred to an inline t&period;count() to protect against a reliance on the exact type of t&period;

This helper is used to convert durations&sol;time&lowbar;points before passing them over an interface that doesn&apos;t support std&colon;&colon;chrono (e&period;g&period; RPC, debug log, or the GUI)

== Return Value

The tick count of d expressed in the Dur1 units&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *d*
| Duration to convert&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
