Go to the SVN repository for this file.
1 #ifndef NETCACHE__SRV_TIME__HPP 2 #define NETCACHE__SRV_TIME__HPP 35 # include <sys/time.h> 77time_t
Sec(
void)
const;
80 long NSec(
void)
const;
Class incorporating convenient methods to work with struct timespec.
bool operator>(const CSrvTime &t) const
Compare object's value to another CSrvTime object's value.
int Compare(const CSrvTime &t) const
Compares object's value to another CSrvTime object's value.
bool operator<(const CSrvTime &t) const
static int CurSecs(void)
Current time in seconds since epoch (time_t).
static int TZAdjustment(void)
Timezone adjustment (in seconds) for times stored in CSrvTime.
bool operator>=(const CSrvTime &t) const
CSrvTime & operator-=(const CSrvTime &t)
Subtract value of other CSrvTime object from this one.
time_t & Sec(void)
Read/set number of seconds since epoch stored in the object.
CSrvTime & operator+=(const CSrvTime &t)
Add value of other CSrvTime object to this one.
bool operator<=(const CSrvTime &t) const
static CSrvTime Current(void)
Exact current time with precision up to nanoseconds.
Uint8 AsUSec(void) const
Converts object's value to microseconds since epoch.
Uint1 Print(char *buf, EFormatType fmt) const
Formats time value in the object and writes it in buf.
long & NSec(void)
Read/set number of nanoseconds stored in the object.
EFormatType
Type of time formatting in the Print() method.
@ eFmtHumanUSecs
Format that can be readable by humans with precision up to microseconds.
@ eFmtHumanSeconds
Format that can be readable by humans with precision up to seconds.
@ eFmtJson
For JSON output.
@ eFmtLogging
Format used in logs which is YYYY-MM-DDThh:mm:ss.ssssss.
uint8_t Uint1
1-byte (8-bit) unsigned integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
constexpr Uint8 kMSecsPerSecond
constexpr Uint8 kUSecsPerSecond
constexpr Uint8 kUSecsPerMSec
constexpr Uint8 kNSecsPerMSec
constexpr Uint8 kNSecsPerUSec
constexpr Uint8 kNSecsPerSecond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4