Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JSystem
JTime.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
JSystem/JTime.hh
"
5
#include "
Jeep/JParser.hh
"
6
#include "
Jeep/JMessage.hh
"
7
8
9
/**
10
* \file
11
* Example program to show system time.
12
* \author mdejong
13
*/
14
int
main
(
int
argc,
char
* argv[])
15
{
16
using namespace
std;
17
using namespace
JPP;
18
19
int
debug
;
20
21
try
{
22
23
JParser<>
zap(
"Example program to show system time."
);
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:1500
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:1961
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JTime.hh
System time information.
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5