Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
tests
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
:
37
usec_t
_start
;
38
usec_t
_elapsed
;
39
bool
_active
;
40
};
41
42
#endif
Clock::Clock
Clock(void)
Definition:
Clock.cpp:62
Clock
Definition:
Clock.hh:21
Clock::~Clock
~Clock(void)
Definition:
Clock.cpp:71
Clock::reset
usec_t reset(void)
Definition:
Clock.hh:33
int64_t
__int64 int64_t
Definition:
config-win32.h:27
usec_t
int64_t usec_t
Definition:
Clock.hh:17
Clock::stop
usec_t stop(void)
Definition:
Clock.cpp:95
Clock::_start
usec_t _start
Definition:
Clock.hh:37
Clock::time
static usec_t time(void)
Definition:
Clock.cpp:27
Clock::_elapsed
usec_t _elapsed
Definition:
Clock.hh:38
Clock::_active
bool _active
Definition:
Clock.hh:39
Clock::start
usec_t start(void)
Definition:
Clock.cpp:87
Clock::elapsed
usec_t elapsed(void) const
Definition:
Clock.cpp:77
Clock::UsingCPU
static bool UsingCPU
Definition:
Clock.hh:24
Clock::active
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