Functions
test_timekeeper.cxx File Reference
#include "WireCellUtil/Testing.h"
#include "WireCellUtil/TimeKeeper.h"
#include <unistd.h>
#include <iostream>

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 13 of file test_timekeeper.cxx.

14 {
15  TimeKeeper tk("test_testing");
16  cout << tk("sleeping") << endl;;
17  sleep(1);
18  cout << tk("awake") << endl;
19 
20  TimeKeeper::deltat dt = tk.last_duration();
21  AssertMsg(dt.seconds() == 1, "Bad sleep.");
22 
23  cout << "TimeKeeper summary: " << endl;
24  cout << tk.summary() << endl;
25 }
#define AssertMsg
Definition: Testing.h:8
boost::posix_time::time_duration deltat
Definition: TimeKeeper.h:24
QTextStream & endl(QTextStream &s)