yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
tstamp.h File Reference

Timestamp utilities. More...

#include <time.h>
#include <sys/time.h>
Include dependency graph for tstamp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TSTAMP_MIN_HEXSIZE   17
 minimum buffer size for hex format
 
#define TSTAMP_MIN_SIZE   29
 normal minimum buffer size for a tstamp buffer More...
 
#define TSTAMP_DATE_SIZE   12
 minimum buffer size for just a date string This value MUST be the minimum size buffer used for the tstamp_datetime and tstamp_local_datetime functions
 
#define TSTAMP_SQL_SIZE   20
 minimum buffer size for SQL date format string
 
#define TSTAMP_HTML_SIZE   50
 minimum buffer size for HTML format string
 

Functions

void tstamp_datetime (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
void tstamp_highres_datetime (xmlChar *buff)
 Set the current date and time in an XML dateTime string format using highres format. More...
 
void tstamp_local_datetime (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
void tstamp_local_highres_datetime (xmlChar *buff)
 Set the current date and time in an XML dateTime string format using highres format. More...
 
void tstamp_date (xmlChar *buff)
 Set the current date in an XML dateTime string format. More...
 
void tstamp_datetime_sql (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
xmlChar * tstamp_convert_to_utctime (const xmlChar *timestr, boolean *isNegative, status_t *res)
 Check if the specified string is a valid dateTime or date-and-time string is valid and if so, convert it to UTC time. More...
 
void tstamp_datetime_dirname (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
void tstamp_time2datetime (time_t *timerec, xmlChar *buff)
 Convert the specified time_t to a YANG data-and-time format. More...
 
status_t tstamp_time2htmltime (time_t *timerec, xmlChar *buff, size_t buffsize)
 Convert the specified time_t to a HTML timestamp string. More...
 
status_t tstamp_htmltime2time (const xmlChar *timestr, time_t *timerec)
 Convert the specified HTML timestamp string to time_t format. More...
 
int32 tstamp_difftime (time_t *time1, time_t *time2)
 Compare 2 time_t structs. More...
 
void tstamp_now (time_t *tim)
 Set the time_t to the current time. More...
 
long int tstamp_diff (struct timeval *start_time, struct timeval *end_time, long int *usec)
 Get the elapsed time between two timeval structs. More...
 
void tstamp_time2hex (time_t *tim, xmlChar *buf)
 Convert the time_t to a string of hex digits. More...
 
time_t tstamp_cvt_TIME (char const *time_str)
 Convert the DATE string to a time_t. More...
 
void tstamp_highres_timenow (struct timespec *ts)
 Get the current time using a high res timestamp. More...
 

Detailed Description

Timestamp utilities.