728x90
728x170
*[header][other] chrono (C++11)
<chrono>
Time library
chrono
is the name of a header, but also of a sub-namespace: All the elements in this header (except for the common_type specializations) are not defined directly under the std namespace (like most of the standard library) but under the std::chrono namespace.The elements in this header deal with time. This is done mainly by means of three concepts:
- Durations
- They measure time spans, like: one minute, two hours, or ten milliseconds.
In this library, they are represented with objects of the duration class template, that couples a count representation and a period precision (e.g., ten milliseconds has ten as count representation and milliseconds as period precision). - Time points
- A reference to a specific point in time, like one's birthday, today's dawn, or when the next train passes.
In this library, objects of the time_point class template express this by using a duration relative to an epoch(which is a fixed point in time common to all time_point objects using the same clock). - Clocks
- A framework that relates a time point to real physical time.
The library provides at least three clocks that provide means to express the current time as a time_point: system_clock, steady_clock and high_resolution_clock.
For typical examples, see steady_clock or system_clock.
Classes
duration and time_point:
- duration
- Duration (class template )
- time_point
- Time point (class template )
clocks:
- system_clock
- System clock (class )
- steady_clock
- Steady clock (class )
- high_resolution_clock
- High resolution clock (class )
traits:
- treat_as_floating_point
- Treat as floating point (class template )
- duration_values
- Duration values (class template )
- common_type (duration)
- Specialization of common_type for duration (class template )
Functions
- duration_cast
- Duration cast (function template )
- time_point_cast
- Time_point cast (function template )
Class instantiation typedefs
The following convenience typedefs of instantiations of duration are also defined in this namespace:- hours
- Duration in hours (class )
- minutes
- Duration in minutes (class )
- seconds
- Duration in seconds (class )
- milliseconds
- Duration in milliseconds (class )
- microseconds
- Duration in microseconds (class )
- nanoseconds
- Duration in nanoseconds (class )
728x90
그리드형(광고전용)
'Programming > C++' 카테고리의 다른 글
[header][other] functional (0) | 2017.11.08 |
---|---|
[header][other] exception (0) | 2017.11.08 |
[header][other] complex (0) | 2017.11.08 |
[header][other] codecvt (C++11) (0) | 2017.11.08 |
[header][other] bitset (0) | 2017.11.08 |
[header][other] algorithm (0) | 2017.11.08 |
[header][container] unordered_set (C++11) (0) | 2017.11.08 |
[header][container] unordered_map (C++11) (0) | 2017.11.08 |