Time Functions


These functions are used to work with time values. Functions are included to retrieve various kinds of time, set various kinds of time, set up callbacks which are executed when time changes and more.

TutGetCurrentTime — determine the current SmartSockets data time

T_REAL8 TutGetCurrentTime() 

TutGetCurrentTimeStruct — determine the current SmartSockets data time as a time struct

T_BOOL TutGetCurrentTimeStruct(time_return) 
T_TIME_STRUCT *time_return; 

TutGetWallTime — determine the current wall clock (computer) time

T_REAL8 TutGetWallTime() 

TutGetWallTimeStruct — determine the current wall clock (computer) time as a time struct

T_BOOL TutGetWallTimeStruct(time_return) 
T_TIME_STRUCT *time_return; 

TutSetCurrentTime — set the current data time for the process

T_BOOL TutSetCurrentTime(time_val) 
T_REAL8 time_val; 

TutSetCurrentTimeStruct — set the current data time for the process, using the most precise method

T_BOOL TutSetCurrentTimeStruct(timep) 
T_TIME timep; 

TutTimeChangeCbCreate — create a time change callback

T_CB TutTimeChangeCbCreate(func, arg) 
T_TIME_CHANGE_CB_FUNC func; 
T_PTR arg; 

TutTimeChangeCbLookup — look up a time change callback

T_CB TutTimeChangeCbLookup(func, arg) 
T_TIME_CHANGE_CB_FUNC func; 
T_PTR arg; 

TutTimeCvtCreate — create a time converter

T_TIME_CVT TutTimeCvtCreate(name, num_to_str_func, str_to_num_func,  
destroy_func) 
T_STR name; 
T_TIME_CVT_NUM_TO_STR_FUNC num_to_str_func; 
T_TIME_CVT_STR_TO_NUM_FUNC str_to_num_func; 
T_TIME_CVT_DESTROY_FUNC destroy_func; 

TutTimeCvtDestroy — destroy a time converter

T_BOOL TutTimeCvtDestroy(time_cvtr) 
T_TIME_CVT time_cvtr; 

TutTimeCvtLookup — look up a time converter by name

T_TIME_CVT TutTimeCvtLookup(name) 
T_STR name; 

TutTimeCvtNumToStr — convert a numeric time value to a string

T_BOOL TutTimeCvtNumToStr(time_cvtr, time_num, time_str_return) 
T_TIME_CVT time_cvtr; 
T_REAL8 time_num; 
T_STR *time_str_return; 

TutTimeCvtStrToNum — convert a string time value to a number

T_BOOL TutTimeCvtStrToNum(time_cvtr, time_str, time_num_return) 
T_TIME_CVT time_cvtr; 
T_STR time_str; 
T_REAL8 *time_num_return; 

TutTimeCvtTraverse — traverse all time converters

T_PTR TutTimeCvtTraverse(traverse_func, traverse_arg) 
T_TIME_CVT_TRAV_FUNC traverse_func; 
T_PTR traverse_arg; 

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

T_STR TutTimeNumToStr(time_num) 
T_REAL8 time_num; 

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

T_BOOL TutTimeStrToNum(time_str, time_num_return) 
T_STR time_str; 
T_REAL8 *time_num_return; 

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