GCS  0.2.3
Public Member Functions | Static Public Member Functions
gu::datetime::Date Class Reference

Date/time representation. More...

#include <gu_datetime.hpp>

Public Member Functions

long long get_utc () const
 
bool operator== (const Date cmp) const
 
bool operator< (const Date cmp) const
 
Date operator+ (const Period &add) const
 Add period to Date.
 
Date operator- (const Period &dec) const
 Decrement period from Date.
 
Period operator- (const Date &dec) const
 
 Date (const long long utc_=0)
 
void _timespec (timespec &ts) const
 

Static Public Member Functions

static Date now ()
 Get system time. More...
 
static Date calendar ()
 Get time from system-wide realtime clock.
 
static Date monotonic ()
 Get time from monotonic clock.
 
static Date max ()
 Get maximum representable timestamp.
 
static Date zero ()
 Get zero time.
 

Detailed Description

Date/time representation.

Todo:
Parsing date from string is not implemented yet, only possible to get current system time or maximum time.

Member Function Documentation

void gu::datetime::Date::_timespec ( timespec &  ts) const
inline

convert to timespec - for internal use

long long gu::datetime::Date::get_utc ( ) const
inline

Return 64-bit timestamp representing system time in nanosecond resolution.

static Date gu::datetime::Date::now ( )
inlinestatic

Get system time.

Note
This call should be deprecated in favor of calendar() and monotonic().

The documentation for this class was generated from the following file: