TutSetCurrentTimeStruct set the current data time for the process, using the most precise method
timep
pointer to T_TIME_STRUCT with the time to be set
TRUE
if successful, FALSE
otherwise.
If TutSetCurrentTimeStruct fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TutSetCurrentTimeStruct sets the current value of data time for the current process. Whatever processing is required based on time values being set then occurs.
This function provides a more precise method to set the value of time. Depending on data rates and timing requirements, it may not be possible to provide the required accuracy using double-precision time values, so this function allows extra accuracy at the expense of some convenience. Time is maintained internally using both T_TIME_STRUCT and T_REAL8 so that either method can be used, depending on the requirements of the process.
Most processes do not tolerate time reversals. Be careful not to set time backwards unless it is really intended.
Negative time values are not permitted.
TutGetCurrentTimeStruct, TutSetCurrentTime, TutTimeChangeCbCreate
This example sets the value of data time to the current wall clock time:
T_TIME_STRUCT wall_time; if (!TutGetWallTimeStruct(&wall_time)) {/* error */
} if (!TutSetCurrentTimeStruct(&wall_time)) {/* error */
}
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |