Namespaces | Functions | Variables
xstime.c File Reference
#include "xstime.h"
#include "xstimestamp.h"
#include <stdio.h>
#include <wchar.h>
#include <errno.h>
#include <unistd.h>
#include <sys/time.h>
#include <pthread.h>
#include <string.h>
#include <time.h>
Include dependency graph for xstime.c:

Go to the source code of this file.

Namespaces

 XsTime
 Namespace for time and date constants and operations.
 

Functions

void XsTime_getDateAsString (char *dest, const struct tm *date)
 Retrieves the date as string representation The format is YYYYMMDD so 25 dec 2010 is stored as an array dest[9] = { '2', '0', '1', '0', '1', '2', '2', '5' }. More...
 
void XsTime_getDateAsWString (wchar_t *dest, const struct tm *date)
 Retrieves the date as wstring representation The format is YYYYMMDD so 25 dec 2010 is stored as an array dest[8] = {'2', '0', '1', '0', '1', '2', '2', '5' }. More...
 
int64_t XsTime_getDateTime (struct tm *date)
 Retrieves the date and time (platform-independent) More...
 
void XsTime_getTimeAsString (char *dest, const struct tm *date)
 Retrieves the time as binary The format is HHMMSShh (where H is hour and 'h' is hundredths) so 14:25:01.23 is stored as an array dest[8] = { '1', '4', '2', '5', '0', '1', '2', '3'}. More...
 
void XsTime_getTimeAsWString (wchar_t *dest, const struct tm *date)
 Retrieves the time as binary The format is HHMMSShh (where H is hour and 'h' is hundredths) so 14:25:01.23 is stored as an array dest[8] = { '1', '4', '2', '5', '0', '1', '2', '3'}. More...
 
uint32_t XsTime_getTimeOfDay (struct tm *date_, time_t *secs_)
 The function returns the current time of day in ms since midnight. More...
 
void XsTime_initializeTime ()
 Stabilize the clock. More...
 
int64_t XsTime_localToUtc ()
 Returns the conversion value from local time to UTC time in ms. More...
 
void XsTime_msleep (uint32_t ms)
 Make the current thread sleep for at least ms milliseconds. More...
 
int64_t XsTime_timeStampNow (XsTimeStamp *now)
 Returns the current time in ms since the epoch (Jan 1st 1970) More...
 
void XsTime_udelay (uint64_t us)
 Delays the current thread for at least us microseconds. More...
 
int64_t XsTime_utcToLocal ()
 Returns the conversion value from UTC time to local time in ms. More...
 

Variables

const XsTimeStamp XsTime_milliSecPerDay = { 60 * 60 * 24 * 1000LL }
 The number of milliseconds in a normal day. More...
 
const XsTimeStamp XsTime_secPerDay = { 60 * 60 * 24LL }
 The number of seconds in a normal day. More...
 
const XsTimeStamp XsTime_timeStampMax = { 0x7FFFFFFFFFFFFFFFLL }
 The maximum positive value of an XsTimeStamp value. More...
 

Variable Documentation

◆ XsTime_milliSecPerDay

const XsTimeStamp XsTime_milliSecPerDay = { 60 * 60 * 24 * 1000LL }

The number of milliseconds in a normal day.

Definition at line 91 of file xstime.c.

◆ XsTime_secPerDay

const XsTimeStamp XsTime_secPerDay = { 60 * 60 * 24LL }

The number of seconds in a normal day.

Definition at line 88 of file xstime.c.

◆ XsTime_timeStampMax

const XsTimeStamp XsTime_timeStampMax = { 0x7FFFFFFFFFFFFFFFLL }

The maximum positive value of an XsTimeStamp value.

Definition at line 94 of file xstime.c.



xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:21