Namespaces
Variants
Views
Actions

std::chrono::time_point::time_point

From cppreference.com
< cpp‎ | chrono‎ | time point
Revision as of 15:44, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
time_point();
</td>

<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
explicit time_point(const std::chrono::duration& d);
</td>

<td > (2) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
template <class Duration2>
time_point(const time_point<clock, Duration2>& t);
</td>

<td > (3) </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Constructs a new time_point from one of several optional data sources.

1. Default constructor, creates a time_point with a value of Clock's epoch.

2. Constructs a time_point at Clock's epoch plus d.

3. Constructs a time_point by converting t to duration. This constructor only participates in overload resolution if Duration2 is implicitly convertible to duration.

Parameters

d - a duration to copy from
t - a time_point to convert from

Example

See also

Template:cpp/chrono/duration/dcl list constructor