Share via


time_point_cast Function

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.

Requirements

Header: chrono

Namespace: std::chrono

See Also

Reference

<chrono>

Other Resources

Header Files