Example program to test JEEP::JTimekeeper class.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "Jeep/JTimekeeper.hh"
#include "JSystem/JTime.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
| int | main (int argc, char *argv[]) |
| |
Example program to test JEEP::JTimekeeper class.
- Author
- mdejong
Definition in file JTimekeeper.cc.
◆ main()
| int main |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 18 of file JTimekeeper.cc.
19{
21
22 int intervalTime_ms;
23 int totalTime_s;
25
26 try {
27
29
33
34 zap(argc, argv);
35 }
36 catch(const exception &error) {
37 FATAL(error.what() << endl);
38 }
39
40
42
45
47
48 cout <<
"hit <return> to interrupt" <<
endl;
49
51
54
55 const long long int t0 = getLocalTime();
56
57 string buffer;
59
61
63
65
66 if (clock.
wait(mask)) {
67
69
71
72 } else {
73
74 ++i;
75 }
76 }
78
79 const long long int t1 = getLocalTime();
80
83 NOTICE(
"Elapsed time [ms] " <<
setw(8) << right << (t1 - t0) / 1000 <<
endl);
84
87 }
88}
std::ostream & rewind(std::ostream &out)
Rewind character.
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
long long int getDelay() const
Get total delay time.
void setInterval(const long long int interval_us)
Set interval time.
void wait() const
Wait until the number of time intervals has elapsed since the last call to the reset method.
void reset(const long long int t0)
Reset time.
Auxiliary class for method select.
void set(const int file_descriptor)
Set file descriptor.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).