Clock.hh
Go to the documentation of this file.
1 /* $Id$
2  *
3  * See the COPYING file for the terms of usage and distribution.
4  */
5 
6 #ifndef __CLOCK_H
7 #define __CLOCK_H
8 
9 #ifdef LOG4CPP_HAVE_STDINT_H
10 #include <stdint.h>
11 #endif // LOG4CPP_HAVE_STDINT_H
12 
13 #ifdef __osf__
14  typedef long usec_t; /* number of microseconds since 1970/01/01 */
15 # define INT64_CONSTANT(val) (val##L)
16 #else
17  typedef int64_t usec_t;
18 # define INT64_CONSTANT(val) (val##LL)
19 #endif
20 
21 class Clock
22 {
23 public:
24  static bool UsingCPU;
25  static usec_t time(void);
26 
27  Clock(void);
28  ~Clock(void);
29 
30  bool active(void) const { return _active; }
31  usec_t elapsed(void) const;
32  usec_t start(void);
33  usec_t reset(void) { return start(); }
34  usec_t stop(void);
35 
36 private:
39  bool _active;
40 };
41 
42 #endif
Clock(void)
Definition: Clock.cpp:62
Definition: Clock.hh:21
~Clock(void)
Definition: Clock.cpp:71
usec_t reset(void)
Definition: Clock.hh:33
__int64 int64_t
Definition: config-win32.h:27
int64_t usec_t
Definition: Clock.hh:17
usec_t stop(void)
Definition: Clock.cpp:95
usec_t _start
Definition: Clock.hh:37
static usec_t time(void)
Definition: Clock.cpp:27
usec_t _elapsed
Definition: Clock.hh:38
bool _active
Definition: Clock.hh:39
usec_t start(void)
Definition: Clock.cpp:87
usec_t elapsed(void) const
Definition: Clock.cpp:77
static bool UsingCPU
Definition: Clock.hh:24
bool active(void) const
Definition: Clock.hh:30


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:14:17