Go to the documentation of this file.
79 #define XSTIMESTAMP_INITIALIZER { 0 }
145 inline void toTimeInfo(
XsTimeInfo& info)
const
168 inline int64_t msTime(
void)
const
174 inline void setMsTime(int64_t t)
181 inline double timeOfDay()
const
188 inline int64_t msTimeOfDay()
const
190 return m_msTime % (24 * 60 * 60 * 1000);
194 inline double secTime()
const
200 inline void setSecTime(
double t)
232 inline bool operator < (
const XsTimeStamp& other)
const
238 inline bool operator <= (
const XsTimeStamp& other)
const
250 inline bool operator > (
const XsTimeStamp& other)
const
256 inline bool operator >= (
const XsTimeStamp& other)
const
262 inline bool operator != (
const XsTimeStamp& other)
const
268 inline bool operator < (
int other)
const
274 inline bool operator <= (
int other)
const
286 inline bool operator > (
int other)
const
292 inline bool operator >= (
int other)
const
298 inline bool operator != (
int other)
const
304 inline int64_t secondTime()
const
310 inline int32_t milliSecondPart()
const
316 inline int32_t secondPart()
const
322 inline int32_t minutePart()
const
328 inline int32_t hourPart()
const
342 inline static int64_t nowMs()
350 inline int64_t elapsedToNow()
const
358 return XsTimeStamp(int64_t(9223372036854775807LL));
435 XsTimeStamp utcToLocalTime(int64_t utcOffset)
const
446 XsTimeStamp localToUtcTime(int64_t utcOffset)
const
XSTYPES_DLL_API void XsTimeStamp_utcToLocalTime_ms(struct XsTimeStamp const *thisPtr, struct XsTimeStamp *local, int64_t utcOffset)
Convert the supplied time from (assumed) UTC to local time, using the offset in utcOffset.
int64_t XsTimeStamp_now(XsTimeStamp *dest)
Returns the current time in ms since the epoch (Jan 1st 1970)
XSTYPES_DLL_API void XsTimeStamp_localToUtcTime2(struct XsTimeStamp const *thisPtr, struct XsTimeStamp *utc, const struct XsTimeInfo *info)
Convert the supplied time from (assumed) local time to UTC, using the offset in info.
double XsTimeStamp_timeOfDay(const XsTimeStamp *thisPtr)
Get the time of day component of the stored timestamp in seconds as a double precision value.
XSTYPES_DLL_API void XsTimeStamp_localToUtcTime_ms(struct XsTimeStamp const *thisPtr, struct XsTimeStamp *utc, int64_t utcOffset)
Convert the supplied time from (assumed) local time to UTC, using the offset in utcOffset.
int32_t XsTimeStamp_hourPart(const XsTimeStamp *thisPtr)
Returns the hours part of the time (in the range 0-23)
int32_t XsTimeStamp_minutePart(const XsTimeStamp *thisPtr)
Returns the minutes part of the time (in the range 0-59)
int64_t XsTimeStamp_maxValue(void)
Returns the maximum value of an XsTimeStamp.
int32_t XsTimeStamp_secondPart(const XsTimeStamp *thisPtr)
Returns the seconds part of the time (in the range 0-59)
bool operator==(const XsFilterProfile &lhs, const XsFilterProfile &rhs)
Returns true if lhs has the same type as rhs.
XSTYPES_DLL_API void XsTimeStamp_utcToLocalTime(struct XsTimeStamp const *thisPtr, struct XsTimeStamp *local)
Convert the supplied time from (assumed) UTC to local time, using the system's local time zone knowle...
int32_t XsTimeStamp_milliSecondPart(const XsTimeStamp *thisPtr)
Returns the millisecond part of the time (in the range 0-999)
void XsTimeStamp_toString(struct XsTimeStamp const *thisPtr, struct XsString *result)
Converts the timestamp into an XsString object in format YYYY/MM/DD hh:mm:ss.nnn.
XSTYPES_DLL_API void XsTimeStamp_utcToLocalTime2(struct XsTimeStamp const *thisPtr, struct XsTimeStamp *local, const struct XsTimeInfo *info)
Convert the supplied time from (assumed) UTC to local time, using the offset in info.
void XsTimeStamp_setMilliSecondTime(XsTimeStamp *thisPtr, int64_t t)
Set the stored time to miliseconds.
int64_t XsTimeStamp_secondTime(const XsTimeStamp *thisPtr)
Returns the number of seconds elapsed since the epoch as stored in the XsTimeStamp.
int64_t XsTimeStamp_fromTimeInfo(struct XsTimeStamp *thisPtr, const struct XsTimeInfo *info)
Creates a (UTC) XsTimeStamp from an XsTimeInfo object.
XSTYPES_DLL_API void XsTimeStamp_localToUtcTime(struct XsTimeStamp const *thisPtr, struct XsTimeStamp *utc)
Convert the supplied time from (assumed) local time to UTC, using the system's local time zone knowle...
int64_t m_msTime
The timestamp value.
void XsTimeStamp_toTimeInfo(struct XsTimeStamp const *thisPtr, struct XsTimeInfo *info)
Converts the timestamp into an XsTimeInfo object.
A 0-terminated managed string of characters.
struct XsTimeStamp XsTimeStamp
This class contains method to set, retrieve and compare timestamps.
A structure for storing Time values.