OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Timer.h
Go to the documentation of this file.
1 #ifndef OPAL_Timer_HH
2 #define OPAL_Timer_HH 1
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: Timer.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Timer
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:48 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include <ctime>
22 #include <string>
23 
24 
25 // Class Timer
26 // ------------------------------------------------------------------------
28 // Encapsulates the UNIX wall time functions.
29 // Get Calendar date or time.
30 
31 namespace OPALTimer {
32 
33  class Timer {
34 
35  public:
36 
38  // Store the system clock time.
39  Timer();
40 
41  ~Timer();
42 
44  std::string date() const;
45 
47  std::string time() const;
48 
49  private:
50 
51  // Not implemented.
52  Timer(const Timer &);
53  void operator=(const Timer &);
54 
55  time_t timer;
56  };
57 
58 }
59 #endif // OPAL_Timer_HH
Timer()
Constructor.
Definition: Timer.cpp:26
time_t timer
Definition: Timer.h:55
void operator=(const Timer &)
std::string date() const
Return date.
Definition: Timer.cpp:35
std::string time() const
Return time.
Definition: Timer.cpp:42