mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -05:00
* apply clang-format and cmake-format and add style check workflow * add declare package definition * add additional public methods and rename internals * change development verison tag to 1.0.0 * rename internal method * rename public method * rename test var * update copyright and fix comment * typo * run fix-format * fix test function names
26 lines
633 B
C++
26 lines
633 B
C++
//
|
|
// timer.cpp
|
|
// ~~~~~~~~~
|
|
//
|
|
// Copyright (c) 2003-2016 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 <boost/date_time/posix_time/posix_time.hpp>
|
|
#include <iostream>
|
|
|
|
void print(const boost::system::error_code& /*e*/) { std::cout << "Hello, world!" << std::endl; }
|
|
|
|
int main() {
|
|
boost::asio::io_service io;
|
|
|
|
boost::asio::deadline_timer t(io, boost::posix_time::seconds(1));
|
|
t.async_wait(&print);
|
|
|
|
io.run();
|
|
|
|
return 0;
|
|
} |