std::chrono::time_point<Clock,Duration>::min (3) - Linux Manuals
std::chrono::time_point<Clock,Duration>::min: std::chrono::time_point<Clock,Duration>::min
Command to display std::chrono::time_point<Clock,Duration>::min
manual in Linux: $ man 3 std::chrono::time_point<Clock,Duration>::min
NAME
std::chrono::time_point<Clock,Duration>::min - std::chrono::time_point<Clock,Duration>::min
Synopsis
static constexpr time_point min(); (until C++20)
static constexpr time_point min() noexcept; (since C++20)
Returns a time_point with the smallest possible duration, i.e. time_point(std::chrono::duration::min()).
Parameters
(none)
Return value
the smallest possible time_point
Example
// Run this code
#include <iostream>
#include <ratio>
#include <chrono>
constexpr auto steady_min = std::chrono::steady_clock::time_point::min();
int main()
{
auto last_frame = steady_min;
std::chrono::duration<float, std::milli> game_time {0.0F};
for (std::size_t count = 0; count < 5; ++count) {
auto current_frame = std::chrono::steady_clock::now();
// initialize timer if first frame ever:
if (last_frame == steady_min)
last_frame = current_frame;
game_time += current_frame - last_frame;
std::cout << "Drawing frame at " << game_time.count() << " ms\n";
// animate frame at time offset game_time ...
}
}
Possible output:
Drawing frame at 0 ms
Drawing frame at 0.17551 ms
Drawing frame at 0.358325 ms
Drawing frame at 0.545384 ms
Drawing frame at 0.736717 ms
Pages related to std::chrono::time_point<Clock,Duration>::min
- std::chrono::time_point<Clock,Duration>::max (3) - std::chrono::time_point<Clock,Duration>::max
- std::chrono::time_point<Clock,Duration>::operator++, (3) - std::chrono::time_point<Clock,Duration>::operator++,
- std::chrono::time_point<Clock,Duration>::operator++,std::chrono::time_point<Clock,Duration>::operator-- (3) - - std::chrono::time_point<Clock,Duration>::operator++,std::chrono::time_point<Clock,Duration>::operator--
- std::chrono::time_point<Clock,Duration>::operator+,operator- (3) - - std::chrono::time_point<Clock,Duration>::operator+,operator-
- std::chrono::time_point<Clock,Duration>::time_point (3) - std::chrono::time_point<Clock,Duration>::time_point
- std::chrono::time_point<Clock,Duration>::time_since_epoch (3) - std::chrono::time_point<Clock,Duration>::time_since_epoch
- std::chrono::time_point (3) - std::chrono::time_point
- std::chrono::time_point_cast (3) - std::chrono::time_point_cast
- std::chrono::time_of_day (3) - std::chrono::time_of_day
- std::chrono::time_of_day<Duration>::hours,std::chrono::time_of_day<Duration>::minutes, (3) - std::chrono::time_of_day<Duration>::hours,std::chrono::time_of_day<Duration>::minutes,
- std::chrono::time_of_day<Duration>::make12,std::chrono::time_of_day<Duration>::make24 (3) - std::chrono::time_of_day<Duration>::make12,std::chrono::time_of_day<Duration>::make24
- std::chrono::time_of_day<Duration>::operatorprecision, (3) - std::chrono::time_of_day<Duration>::operatorprecision,
- std::chrono::time_of_day<Duration>::operatorprecision,std::chrono::time_of_day<Duration>::to_duration (3) - std::chrono::time_of_day<Duration>::operatorprecision,std::chrono::time_of_day<Duration>::to_duration
- std::chrono::time_of_day<Duration>::time_of_day (3) - std::chrono::time_of_day<Duration>::time_of_day
- std::chrono::time_zone (3) - std::chrono::time_zone
- std::chrono::time_zone::get_info (3) - std::chrono::time_zone::get_info
- std::chrono::time_zone::name (3) - std::chrono::time_zone::name
- std::chrono::time_zone::to_local (3) - std::chrono::time_zone::to_local
- std::chrono::time_zone::to_sys (3) - std::chrono::time_zone::to_sys
- std::chrono::tai_clock (3) - std::chrono::tai_clock