4 #ifndef _PSTDINT_H_INCLUDED
13 #define XSENS_SEC_PER_DAY (60*60*24)
14 #define XSENS_MS_PER_DAY (XSENS_SEC_PER_DAY*1000)
16 #define XSENS_TIMESTAMP_MAX (0x7FFFFFFFFFFFFFFFLL)
27 uint32_t
getTimeOfDay(tm* date_ = NULL, time_t* secs_ = NULL);
69 TimeSync(
double skew,
int historySize);
98 #endif // XSENS_TIME_H
uint32_t millisecondsElapsed()
Returns the number of milliseconds that has elapsed since the constructor or the restart function wer...
Definition: xsens_time.cpp:522
int isInitialized() const
Returns whether the TimeSync has passed the initial stage of initialization.
Definition: xsens_time.cpp:374
void reset()
Reset the time sync algorithm.
Definition: xsens_time.cpp:348
void getTimeAsString(uint8_t *dest, const tm *date)
Retrieves the time as binary The format is HHMMSShh (where H is hour and 'h' is hundredths) so 14:25:...
Definition: xsens_time.cpp:144
int64_t getDateTime(tm *date)
Retrieves the date and time (platform-independent)
Definition: xsens_time.cpp:108
int64_t TimeStamp
A real-time timestamp (ms)
Definition: xsens_time.h:20
TimeStamp localTime(TimeStamp external)
Returns the local time computed from the supplied reference time.
Definition: xsens_time.cpp:470
uint32_t getTimeOfDay(tm *date_, time_t *secs_)
A platform-independent clock.
Definition: xsens_time.cpp:54
TimeSync(double skew, int historySize)
Constructor.
Definition: xsens_time.cpp:323
void msleep(uint32_t ms)
Sleep for ms milliseconds.
Definition: xsens_time.cpp:165
void getDateAsString(uint8_t *dest, const tm *date)
Retrieves the date as string representation The format is YYYYMMDD so 25 dec 2010 is stored as an arr...
Definition: xsens_time.cpp:128
void initializeTime()
Stabilize the clock.
Definition: xsens_time.cpp:495
Private data for the TimeSync class.
Definition: xsens_time.cpp:231
void setInitialSkew(double skew)
Set the initial skew value. Since using this value requires a reset, the function automatically reset...
Definition: xsens_time.cpp:366
~TimeSync()
Destructor.
Definition: xsens_time.cpp:340
void restart()
Set the timer back to 0.
Definition: xsens_time.cpp:514
Class for synchronizing two clocks.
Definition: xsens_time.h:64
Definition: xsens_time.h:82
TimeStamp timeStampNow()
Definition: xsens_time.cpp:482
MillisecondTimer()
Constructor.
Definition: xsens_time.cpp:507
TimeStamp externalTime(TimeStamp local)
Returns the reference time computed from the supplied local time.
Definition: xsens_time.cpp:477
void update(TimeStamp local, TimeStamp external)
Update the time synchronization with new information.
Definition: xsens_time.cpp:387