Ticket #9337: test.cc

File test.cc, 335 bytes (added by Markus Friedrich <friedrich.at.gc@…>, 9 years ago)

test program

Line 
1#include <iostream>
2#include <unistd.h>
3#define BOOST_CHRONO_HEADER_ONLY
4#include <boost/chrono.hpp>
5
6using namespace std;
7using namespace boost::chrono;
8
9int main() {
10 process_cpu_clock::time_point start=process_cpu_clock::now();
11 sleep(1);
12 process_cpu_clock::time_point stop=process_cpu_clock::now();
13 cout<<stop-start<<endl;
14}