//
// time_t_timer.cpp
// ~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/asio.hpp>
#include <ctime>
#include <chrono>
#include <iostream>
// A custom implementation of the Clock concept from the standard C++ library.
struct time_t_clock
{
// The duration type.
typedef std::chrono::steady_clock::duration duration;
// The duration's underlying arithmetic representation.
typedef duration::rep rep;
// The ratio representing the duration's tick period.
typedef duration::period period;
// An absolute time point represented using the clock.
typedef std::chrono::time_point<time_t_clock> time_point;
// The clock is not monotonically increasing.
static constexpr bool</
搬运Boost1.78.0的time_t_timer.cpp官方例程(基于C++11)
最新推荐文章于 2024-04-01 15:36:09 发布
本文介绍了如何在C++11环境下使用Boost库的time_t_timer类,通过一个官方示例详细解析其用法,适用于Visual Studio开发人员。
摘要由CSDN通过智能技术生成