1 //  io_ex1.cpp  ----------------------------------------------------------//
2 
3 //  Copyright 2010 Howard Hinnant
4 //  Copyright 2010 Vicente J. Botet Escriba
5 
6 //  Distributed under the Boost Software License, Version 1.0.
7 //  See http://www.boost.org/LICENSE_1_0.txt
8 
9 /*
10 This code was adapted by Vicente J. Botet Escriba from Hinnant's html documentation.
11 Many thanks to Howard for making his code available under the Boost license.
12 
13 */
14 
15 #include <boost/chrono/chrono_io.hpp>
16 #include <iostream>
17 
main()18 int main()
19 {
20     using std::cout;
21     using namespace boost;
22     using namespace boost::chrono;
23 
24 #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
25     typedef time_point<steady_clock, duration<double, ratio<3600> > > T;
26     T tp = steady_clock::now();
27     std::cout << tp << '\n';
28 #endif
29     return 0;
30 }
31 
32 //~ 17.8666 hours since boot
33