Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
getTimestamp.cc File Reference
#include <iostream>
#include <iomanip>
#include "TTimeStamp.h"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 Auxiliary program to print UNIX time in human readable format. More...
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Auxiliary program to print UNIX time in human readable format.

Definition at line 13 of file getTimestamp.cc.

14 {
15  using namespace std;
16 
17  long long int t_ms;
18  int debug;
19 
20  try {
21 
22  JParser<> zap("Auxiliary program to print UNIX time in human readable format");
23 
24  zap['T'] = make_field(t_ms);
25  zap['d'] = make_field(debug) = 1;
26 
27  zap(argc, argv);
28  }
29  catch(const exception &error) {
30  FATAL(error.what() << endl);
31  }
32 
33  const TTimeStamp t0((time_t) t_ms/1000);
34 
35  cout << t0.AsString() << endl;
36 }
Utility class to parse command line options.
Definition: JParser.hh:1514
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level