SmartSockets stores the current value of data time in two different ways: as a double precision floating point value (T_REAL8) and also as a data structure (T_TIME_STRUCT) containing two integers. One for the whole part of the time value (sec
) and one for the fractional part of the time value (usec
), which stores the integer number of microseconds. The data structure is defined in this way:
API functions are provided to deal with both uses of time. TutSetCurrentTime and TutGetCurrentTime deal with time using T_REAL8 values, while TutSetCurrentTimeStruct and TutGetCurrentTimeStruct deal with time using T_TIME values. The T_REAL8 approach is provided for backward compatibility and for those applications where high precision time data is not required. The T_TIME approach is needed for applications where highly precise time definition is required. This is necessary because the number of digits of precision available in a T_REAL8 is not adequate to store time values down to millisecond precision when UNIX time values are used. In general, it is preferable to choose one method for setting and accessing time and use it consistently throughout the application.
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |