class template

<chrono>

template <class Rep, class Period = ratio<1> > class duration;

Duration

Internally, the object stores the

This count is expresed in terms of

type | Representation | Period |
---|---|---|

hours | signed integral type of at least 23 bits | `ratio<3600,1>` |

minutes | signed integral type of at least 29 bits | `ratio<60,1>` |

seconds | signed integral type of at least 35 bits | `ratio<1,1>` |

milliseconds | signed integral type of at least 45 bits | `ratio<1,1000>` |

microseconds | signed integral type of at least 55 bits | `ratio<1,1000000>` |

nanoseconds | signed integral type of at least 64 bits | `ratio<1,1000000000>` |

member type | definition | notes |
---|---|---|

rep | The first template parameter (Rep) | Representation type used as the type for the internal count object. |

period | The second template parameter (Period) | The ratio type that represents a period in seconds. |

**(constructor)**- Construct duration object (public member function )

**(destructor)**- Destroy duration (public member function )

**count**- Get count (public member function )

**zero**- Zero value (public static member function )

**min**- Duration minimum value (public static member function )

**max**- Duration maximum value (public static member function )

**operators**- Duration operators (function template )

**time_point**- Time point (class template )

**duration_values**- Duration values (class template )