MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
steady_clock结构体 参考

稳定时钟 更多...

#include <clocks.hpp>

Public 类型

using duration = _MSTL nanoseconds
 持续时间类型
using rep = duration::rep
 数值类型
using period = duration::period
 时间单位比例
using time_point = _MSTL time_point<steady_clock>
 时间点类型

静态 Public 成员函数

static time_point now () noexcept
 获取当前时间点
template<typename Dur>
static system_clock::time_point to_system (const _MSTL time_point< steady_clock, Dur > &tp)
 将稳定时钟转为系统时钟

静态 Public 属性

static constexpr bool is_steady = true
 时钟稳定性标识

详细描述

稳定时钟

表示单调递增的时钟,不受系统时间调整影响。 稳定时钟的时间点仅用于测量时间间隔。

在文件 clocks.hpp81 行定义.

成员函数说明

◆ now()

time_point steady_clock::now ( )
staticnoexcept

◆ to_system()

template<typename Dur>
system_clock::time_point steady_clock::to_system ( const _MSTL time_point< steady_clock, Dur > & tp)
inlinestatic

将稳定时钟转为系统时钟

参数
tp稳定时钟时间点
返回
系统时钟时间点

在文件 clocks.hpp107 行定义.

引用了 _MSTL, now(), system_clock::now(), time_cast() , 以及 to_system().

被这些函数引用 to_system().

类成员变量说明

◆ is_steady

bool steady_clock::is_steady = true
staticconstexpr

时钟稳定性标识

稳定时钟是单调递增的,不受系统时间调整影响。

在文件 clocks.hpp92 行定义.


该结构体的文档由以下文件生成: