Ai
1 Star 0 Fork 0

green-gitee/博客园

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
stopwatch.cpp 403 Bytes
一键复制 编辑 原始数据 按行查看 历史
green-gitee 提交于 2024-07-23 22:09 +08:00 . Added resources of 18318363.
// stopwatch.cpp
#include "stopwatch.hxx"
#include <chrono>
namespace blogs
{
using std::chrono::milliseconds;
Stopwatch::Stopwatch()
: __start__(steady_clock::now())
{
}
double
Stopwatch::elapsed_time() const
{
time_point<steady_clock> now = steady_clock::now();
return std::chrono::duration_cast<milliseconds>(now - __start__).count() / 1000.0;
}
} // end of namespace blogs
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/green-gitee/cnblogs.git
git@gitee.com:green-gitee/cnblogs.git
green-gitee
cnblogs
博客园
master

搜索帮助