TutTimeNumToStr


Name

TutTimeNumToStr — convert a time number to string using the Time_Format option

Synopsis

T_STR TutTimeNumToStr(time_num) 
T_REAL8 time_num; 

Arguments

time_num — numeric time value to be converted to a string

Return Values

String representation of time_num.

Diagnostics

None

Description

TutTimeNumToStr is a convenience function that converts a numeric time value to its string representation. TutTimeNumToStr uses the value of the option Time_Format to determine which time converter to use and then calls TutTimeCvtNumToStr with the appropriate converter. If TutTimeCvtNumToStr returns FALSE, then TutTimeNumToStr returns the string "UNKNOWN".

Caution

The string returned by TutTimeNumToStr is managed by the time converter and should not be modified or deallocated. If a more permanent copy of the string is needed, use T_STRDUP or TutStrDup to make one.

See Also

TutTimeCvtNumToStr, TutTimeStrToNum

Examples

This example prints the string representation of the current SmartSockets data time and the current wall clock computer time:

TutOut("SmartSockets time is %s.\n", 
TutTimeNumToStr(TutGetCurrentTime())); 
TutOut("Wall clock time is %s\n.", 
TutTimeNumToStr(TutGetWallTime())); 

Because the same string storage is reused by time converters, this does not work:

TutOut("SmartSockets time is %s.\nWall clock time is %s\n", 
       TutTimeNumToStr(TutGetCurrentTime()), 
       TutTimeNumToStr(TutGetWallTime())); 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com