TutGetWallTime get the current wall clock (computer) time
None
Floating-point number containing current computer wall clock time in the number of seconds since midnight January 1, 1970.
None
TutGetWallTime is a convenience function that returns the current wall clock time as a double-precision floating-point number.
On UNIX, MVS, and Windows, TutGetWallTime calls gettimeofday (that fills in a timeval structure) and converts the result to a T_REAL8. This value is the number of seconds since midnight January 1, 1970 GMT.
On OpenVMS, TutGetWallTime calls ftime (that fills in a timeb_t structure) and converts the result to a T_REAL8. This value is also the number of seconds since midnight, January 1, 1970 local time (OpenVMS has no concept of time zones).
TutGetWallTime does not return the current SmartSockets data time. Use TutGetCurrentTime for that.
TutGetCurrentTime, TutGetWallTimeStruct
This example looks up the time converter hms
, gets the current wall clock time, and then converts the time to a string using the hms
converter:
T_TIME_CVT time_cvtr; T_REAL8 wall_time; wall_time = TutGetWallTime(); TutOut("Raw wall clock time is %f.\n", wall_time); time_cvtr = TutTimeCvtLookup("hms"); if (time_cvtr != NULL) { T_STR time_str; if (TutTimeCvtNumToStr(time_cvtr, wall_time, &time_str)) { TutOut("Formatted wall clock time is %s\n", time_str); } }
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |