CMSDK  2.0.1
Classes | Macros | Functions
Functions dealing with time

Classes

struct  cmlabs::PsyDateAndTime
 

Macros

#define USEC_YEAR_0_TO_1970   62167305600000000L
 
#define SECS_PER_YEAR   31536000
 
#define SECS_PER_MONTH   2629744
 
#define SECS_PER_WEEK   604800
 
#define SECS_PER_DAY   86400
 
#define SECS_PER_HOUR   3600
 
#define SECS_PER_MIN   60
 
#define TIME_YEAR_1970   62167305600000000L
 
#define SECOND_MS   1000
 
#define MINUTE_MS   SECS_PER_MIN * 1000
 
#define HOUR_MS   SECS_PER_HOUR * 1000
 
#define DAY_MS   SECS_PER_DAY * 1000
 
#define WEEK_MS   SECS_PER_WEEK * 1000
 
#define MONTH_MS   (uint64)SECS_PER_MONTH * 1000
 
#define YEAR_MS   (uint64)SECS_PER_YEAR * 1000
 
#define SECOND_US   (uint64)1000000
 
#define MINUTE_US   (uint64)SECS_PER_MIN * 1000000
 
#define HOUR_US   (uint64)SECS_PER_HOUR * 1000000
 
#define DAY_US   (uint64)SECS_PER_DAY * 1000000
 
#define WEEK_US   (uint64)SECS_PER_WEEK * 1000000
 
#define MONTH_US   (uint64)SECS_PER_MONTH * 1000000
 
#define YEAR_US   (uint64)SECS_PER_YEAR * 1000000
 
#define PSYSECOND   SECOND_US
 
#define PSYMINUTE   MINUTE_US
 
#define PSYHOUR   HOUR_US
 
#define PSYDAY   DAY_US
 
#define PSYWEEK   WEEK_US
 
#define PSYMONTH   MONTH_US
 
#define PSYYEAR   YEAR_US
 
#define TMC_MASTER   0
 
#define TMC_SLAVE   1
 
#define TMC_SYNC_INTERVAL   60000000
 

Functions

uint64 cmlabs::GetTimeNow ()
 
uint64 cmlabs::SyncToHardwareClock ()
 
bool cmlabs::SetCurrentNetSyncDif (int64 netTimeDif)
 
bool cmlabs::SetCurrentTimeSyncData (uint64 tmc, int64 netTimeAdjust)
 
bool cmlabs::GetCurrentTimeSyncData (uint64 &tmc, int64 &netTimeAdjust)
 
uint64 cmlabs::EstNextTMCWrap ()
 
int64 cmlabs::GetTimeAge (uint64 t)
 
int32 cmlabs::GetTimeAgeMS (uint64 t)
 
uint64 cmlabs::GetTimeFromString (const char *str)
 
uint32 cmlabs::GetHTTPTime (uint64 time, char *buffer, uint32 size)
 
uint64 cmlabs::GetTimeFromPsyDateAndTime (struct PsyDateAndTime &tad)
 
uint32 cmlabs::GetTimeOffsetGMT ()
 
struct PsyDateAndTime cmlabs::GetDateAndTime (uint64 t, bool local=true)
 
struct PsyDateAndTime cmlabs::GetDateAndTimeUTC (uint64 t)
 
struct PsyDateAndTime cmlabs::GetTimeDifference (uint64 t1, uint64 t2)
 
struct PsyDateAndTime cmlabs::GetTimeDifference (int64 dif)
 
char * cmlabs::PrintTime (uint64 t, bool local=true, bool us=true, bool ms=true)
 
char * cmlabs::PrintTimeOnly (uint64 t, bool local=true, bool us=true, bool ms=true)
 
char * cmlabs::PrintTimeDif (uint64 t, bool us=true, bool ms=true)
 
char * cmlabs::PrintDate (uint64 t, bool local=true)
 
char * cmlabs::PrintDateSortable (uint64 t, bool local=true)
 
char * cmlabs::PrintDateSortableDelimiter (uint64 t, const char *del, bool local=true)
 
char * cmlabs::PrintTimeSortable (uint64 t, bool local)
 
char * cmlabs::PrintTimeSortableMillisec (uint64 t, bool local)
 
char * cmlabs::PrintTimeSortableMicrosec (uint64 t, bool local)
 
std::string cmlabs::PrintTimeNowString (bool local=true, bool us=true, bool ms=true)
 
std::string cmlabs::PrintTimeString (uint64 t, bool local=true, bool us=true, bool ms=true)
 
std::string cmlabs::PrintTimeOnlyString (uint64 t, bool local=true, bool us=true, bool ms=true)
 
std::string cmlabs::PrintTimeDifString (uint64 t, bool us=true, bool ms=true)
 
std::string cmlabs::PrintDateString (uint64 t, bool local=true)
 
std::string cmlabs::PrintDateStringSortable (uint64 t, bool local=true)
 
std::string cmlabs::PrintDateStringSortableDelimiter (uint64 t, const char *del, bool local=true)
 
std::string cmlabs::PrintTimeSortableString (uint64 t, bool local=true)
 
std::string cmlabs::PrintTimeSortableMillisecString (uint64 t, bool local=true)
 
std::string cmlabs::PrintTimeSortableMicrosecString (uint64 t, bool local=true)
 
uint64 cmlabs::FTime2PsyTime (uint64 t)
 
bool cmlabs::PsyTime_UnitTest ()
 

Detailed Description

This is a list of the CMSDK time functions