FARGOS/VISTA Object Management Environment Core
..
|
Cache locale-specific time data around a particular point in time. More...
#include <time_point.hpp>
Public Member Functions | |
TimePointCache () | |
Null constructor that does no work. More... | |
TimePointCache (const time_t asOfPOSIXepoch) | |
Create a TimePointCache based around a specific point in time. More... | |
TimePointCache (const struct timespec &asIfOnDay) | |
Create a TimePointCache around a time expressed as a timespec , which is represented using the POSIX epoch. The resulting expanded times will be relative to the local time. More... | |
TimePointCache (const struct tm &asIfOnDay) | |
Create a TimePointCache based around a local expanded time. More... | |
void | initializeForDay (const struct tm &asIfOnDay) |
Initialize a TimePointCache around an already expanded time, which is intended to reflect a local time. More... | |
void | initializeForDay (const struct timespec &asIfOnDay) |
Initialize a TimePointCache around a time specified using a timespec , which is based on the POSIX epoch. The resulting expanded times will be relative to the local time. More... | |
bool | isForDay (const time_t t) const OME_ALWAYS_INLINE |
void | initializeForDay (const time_t asOfPOSIXepoch) |
Initialize a TimePointCache based around a specific point in time. More... | |
int32_t | offsetFromUTC () const OME_ALWAYS_INLINE |
bool | isForDay (const struct tm &dayOfInterest) const |
Public Attributes | |
struct tm | localMidnight |
struct tm | localEndOfDay |
struct tm | local3am |
struct tm | lastTime |
struct tm | utc3am |
time_t | localMidnightEpoch |
time_t | localEndOfDayEpoch |
time_t | local3amEpoch |
time_t | lastTimeEpoch |
int32_t | utcDifferenceSeconds |
Cache locale-specific time data around a particular point in time.
TimePointCache objects maintain information about the local midnight, end of day, and 3am of a specific day to enable efficient manipulation of times that occur within that day. While their use is optional, appropriately constructed TimePointCache objects enable expensive library calls to be avoided when dealing with times that occur within a particular day. Since more than one TimePointCache can be created, multiple threads can be handling information from different days without creating interference.
|
inline |
Null constructor that does no work.
References localEndOfDayEpoch.
|
inlineexplicit |
Create a TimePointCache based around a specific point in time.
asOfPOSIXepoch | indicates the desired point in time based on the POSIX epoch. If the value of 0 is specified, the current time is retrieved using clock_gettime_via_tick(). |
References initializeForDay(), and localEndOfDayEpoch.
|
inlineexplicit |
Create a TimePointCache around a time expressed as a timespec
, which is represented using the POSIX epoch. The resulting expanded times will be relative to the local time.
References initializeForDay().
|
inlineexplicit |
Create a TimePointCache based around a local expanded time.
References initializeForDay().
|
inline |
Initialize a TimePointCache around a time specified using a timespec
, which is based on the POSIX epoch. The resulting expanded times will be relative to the local time.
References CALL_TZSET, and initializeForDay().
|
inline |
Initialize a TimePointCache around an already expanded time, which is intended to reflect a local time.
References lastTime, lastTimeEpoch, local3am, local3amEpoch, localEndOfDay, localEndOfDayEpoch, localMidnight, localMidnightEpoch, utc3am, and utcDifferenceSeconds.
Referenced by initializeForDay(), and TimePointCache().
|
inline |
Initialize a TimePointCache based around a specific point in time.
asOfPOSIXepoch | indicates the desired point in time based on the POSIX epoch. If the value of 0 is specified, the current time is retrieved using clock_gettime_via_tick(). |
The heavy overhead of initialization will not be performed again if the TimePointCache object is already representing the indicated day.
References clock_gettime_via_tick(), initializeForDay(), and isForDay().
|
inline |
References local3am.
|
inline |
References localEndOfDayEpoch, and localMidnightEpoch.
Referenced by LogMessageRecord::formatRecordAsText(), and initializeForDay().
|
inline |
References utcDifferenceSeconds.
Referenced by TimePointOfGranularity< UNITS >::convertDayAndTime().
struct tm TimePointCache::lastTime |
Referenced by initializeForDay().
time_t TimePointCache::lastTimeEpoch |
Referenced by initializeForDay().
struct tm TimePointCache::local3am |
Referenced by initializeForDay(), and isForDay().
time_t TimePointCache::local3amEpoch |
Referenced by initializeForDay().
struct tm TimePointCache::localEndOfDay |
Referenced by initializeForDay().
time_t TimePointCache::localEndOfDayEpoch |
Referenced by initializeForDay(), isForDay(), and TimePointCache().
struct tm TimePointCache::localMidnight |
Referenced by initializeForDay().
time_t TimePointCache::localMidnightEpoch |
Referenced by initializeForDay(), and isForDay().
struct tm TimePointCache::utc3am |
Referenced by initializeForDay().
int32_t TimePointCache::utcDifferenceSeconds |
Referenced by initializeForDay(), and offsetFromUTC().
![]() | Generated: Tue Jul 28 2020 16:03:27
Support Information |