Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JDate.cc File Reference

Example program to show system time. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "JSystem/JDate.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 JDate.cc.

Function Documentation

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

Definition at line 16 of file JDate.cc.

17 {
18  using namespace std;
19 
20  string host_name;
21 
22  try {
23 
24  JParser<> zap("Example program to show system time.");
25 
26  zap(argc, argv);
27  }
28  catch(const exception &error) {
29  FATAL(error.what() << endl);
30  }
31 
32 
33  using namespace JPP;
34 
35  cout << getDate() << endl;
36  cout << getTime() << endl;
37  cout << getDateAndTime() << endl;
38 }
Utility class to parse command line options.
Definition: JParser.hh:1410
static const JDateAndTime getDateAndTime
Function object to get ASCII formatted date and time.
Definition: JDate.hh:115
double getTime(const Hit &hit)
Get true time of hit.
#define FATAL(A)
Definition: JMessage.hh:65
const char * getDate()
Get ASCII formatted date.
Definition: JDate.hh:22