log4shib 2.0.1
Loading...
Searching...
No Matches
TimeStamp.hh
Go to the documentation of this file.
1/*
2 * TimeStamp.hh
3 *
4 * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5 * Copyright 2001, Bastiaan Bakker. All rights reserved.
6 *
7 * See the COPYING file for the terms of usage and distribution.
8 */
9
10#ifndef _LOG4SHIB_TIMESTAMP_HH
11#define _LOG4SHIB_TIMESTAMP_HH
12
14
15namespace log4shib {
16
21 public:
25 TimeStamp();
26
31 TimeStamp(unsigned int seconds, unsigned int microSeconds = 0);
32
36 inline int getSeconds() const {
37 return _seconds;
38 };
39
44 inline int getMilliSeconds() const {
45 return _microSeconds / 1000;
46 };
47
53 inline int getMicroSeconds() const {
54 return _microSeconds;
55 };
56
61 static inline const TimeStamp& getStartTime() {
62 return _startStamp;
63 };
64
65 protected:
67
70 };
71}
72
73#endif // _LOG4SHIB_TIMESTAMP_HH
74
#define LOG4SHIB_EXPORT
Definition Export.hh:11
int getMicroSeconds() const
Returns the subsecond part of the TimeStamp in microseconds.
Definition TimeStamp.hh:53
static const TimeStamp & getStartTime()
Returns a TimeStamp representing the time at which the application started.
Definition TimeStamp.hh:61
static TimeStamp _startStamp
Definition TimeStamp.hh:66
int _microSeconds
Definition TimeStamp.hh:69
int getMilliSeconds() const
Returns the 'subseconds' part of the TimeStamp in milliseconds, getMilliSeconds() == getMicroSeconds(...
Definition TimeStamp.hh:44
int _seconds
Definition TimeStamp.hh:68
int getSeconds() const
Returns the 'seconds' part of the TimeStamp.
Definition TimeStamp.hh:36
TimeStamp()
Constructs a TimeStamp representing 'now'.
Definition TimeStamp.cpp:28
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16