Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.51 KB

chrono-functions.md

File metadata and controls

50 lines (39 loc) · 1.51 KB
title ms.custom ms.date ms.reviewer ms.suite ms.tgt_pltfrm ms.topic f1_keywords ms.assetid caps.latest.revision manager
<chrono> functions | Microsoft Docs
11/04/2016
article
chrono/std::duration_cast
chrono/std::time_point_cast
d6800e15-77a1-4df3-900e-d8b2fee190c7
10
ghogen

<chrono> functions

duration_cast time_point_cast

duration_cast

Casts a duration object to a specified type.

template <class To, class Rep, class Period>  
constexpr To duration_cast(const duration<Rep, Period>& Dur);

Return Value

A duration object of type To that represents the time interval Dur, which is truncated if it has to fit into the target type.

Remarks

If To is an instantiation of duration, this function does not participate in overload resolution.

time_point_cast

Casts a time_point object to a specified type.

template <class To, class Clock, class Duration>  
time_point<Clock, To> time_point_cast(const time_point<Clock, Duration>& Tp);

Return Value

A time_point object that has a duration of type To.

Remarks

Unless To is an instantiation of duration, this function does not participate in overload resolution.

See Also

<chrono>