TutGetWallTimeStruct get the current wall clock (computer) time as a time struct
time_return
pointer to location to store wall time
TRUE
if successful, FALSE
otherwise.
None
TutGetWallTimeStruct is a convenience function that returns the current wall clock time into a T_TIME_STRUCT pointed to by the caller.
On UNIX, MVS, and Windows, TutGetWallTimeStruct calls gettimeofday (that fills in a timeval structure) and fills in the fields of the pointed to T_TIME_STRUCT. This value is the number of seconds and microseconds since midnight January 1, 1970 GMT.
On OpenVMS, TutGetWallTimeStruct calls ftime (that fills in a timeb_t structure) and fills in the fields of the provided T_TIME_STRUCT. This value is the number of seconds and microseconds since midnight, January 1, 1970 local time. (OpenVMS has no concept of time zones.)
TutGetWallTimeStruct does not return the current SmartSockets data time. Use TutGetCurrentTimeStruct for that.
TutGetCurrentTimeStruct, TutGetWallTime
This example gets the current wall clock time, and then prints out the time with a formatted print statement:
T_TIME_STRUCT time_struct; if (!TutGetWallTimeStruct(&time_struct)) { TutOut("Could not get wall time\n"); return; } TutOut("Raw wall clock time is %d.%06d.\n", time_struct.sec, time_struct.usec);
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |