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

系统时钟 更多...

#include <clocks.hpp>

Public 类型

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

静态 Public 成员函数

static time_point now () noexcept
 获取当前时间点
static seconds to_seconds (const time_point &time_point_value) noexcept
 将时间点转换为时间值
static time_point from_seconds (const seconds time_value) noexcept
 从时间值创建时间点

静态 Public 属性

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

详细描述

系统时钟

表示系统范围的实时时钟,系统时钟的时间点可以转换为日历时间。

在文件 clocks.hpp29 行定义.

成员函数说明

◆ from_seconds()

time_point system_clock::from_seconds ( const seconds time_value)
inlinestaticnoexcept

从时间值创建时间点

参数
time_value要转换的时间值
返回
对应的时间点

在文件 clocks.hpp67 行定义.

引用了 _MSTL , 以及 time_cast().

◆ now()

time_point system_clock::now ( )
staticnoexcept

获取当前时间点

返回
当前系统时间的时间点

返回系统当前时间的时间点表示。

被这些函数引用 click::start(), click::stop(), steady_clock::to_system() , 以及 click::update().

◆ to_seconds()

seconds system_clock::to_seconds ( const time_point & time_point_value)
inlinestaticnoexcept

将时间点转换为时间值

参数
time_point_value要转换的时间点
返回
对应的时间值

在文件 clocks.hpp58 行定义.

引用了 to_seconds().

被这些函数引用 to_seconds().

类成员变量说明

◆ is_steady

bool system_clock::is_steady = false
staticconstexpr

时钟稳定性标识

系统时钟不是稳定的,可能受系统时间调整影响。

在文件 clocks.hpp43 行定义.


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