Jpp
Functions
JTime.cc File Reference
#include <iostream>
#include <iomanip>
#include "JSystem/JTime.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Example program to show system time.

Author
mdejong

Definition in file JTime.cc.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 14 of file JTime.cc.

15 {
16  using namespace std;
17  using namespace JPP;
18 
19  int debug;
20 
21  try {
22 
23  JParser<> zap("Example program to test class inspection.");
24 
25  zap['d'] = make_field(debug) = 0;
26 
27  zap(argc, argv);
28  }
29  catch(const exception &error) {
30  FATAL(error.what() << endl);
31  }
32 
33  cout << getLocalTime() << " us" << endl;
34 }
JPARSER::JParser
Utility class to parse command line options.
Definition: JParser.hh:1493
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
debug
int debug
debug level
Definition: JSirene.cc:59
JSYSTEM::getLocalTime
static const JLocalTime getLocalTime
Function object to get local time in micro seconds.
Definition: JSystem/JTime.hh:61
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
std
Definition: jaanetDictionary.h:36
FATAL
#define FATAL(A)
Definition: JMessage.hh:67