time_point

class template
<chrono>

std::chrono::time_point

template <class Clock, class Duration = typename Clock::duration>
  class time_point;
Time point
A time_point object expresses a point in time relative to a clock's epoch.

Internally, the object stores an object of a duration type, and uses the Clock type as a reference for its epoch.

Template parameters

Clock
A clock class, such as system_clock, steady_clock, high_resolution_clock or a custom clock class.
Duration
A duration type.

Member types

The following aliases are member types of time_point. They are widely used as parameter and return types by member functions:

member typedefinitionnotes
clockThe first template parameter (Clock)The clock class (either system_clock, steady_clock, high_resolution_clock or a custom clock class).
durationThe second template parameter (Duration)The duration type used to represent the time point.
repduration::repType returned by duration::count.
periodduration::periodThe ratio type that represents the length of a period in seconds.

Member functions


static member functions


Non-member functions


See also