TCCDateTime.cc

Summary
TCCDateTime.cc
Functions
f__time Current calendar time of the system in seconds
f__ctime Convert a time value in seconds to human readable string.
f__ctime__UTC Convert a time value in seconds to human readable string.
f__getTimeFormatted Return the current calendar time in a formatted way
f__time2sec Function to convert a formated time value to seconds.
f__time2sec__UTC Function to convert a formated time value to seconds.
f__getCurrentDateWithOffset Generate a date from the actual date and time plus the parameter in seconds e.g.
f__getCurrentGMTDate Return the current GMT date in format RFC 1123-Date e.g.:Sat, 13 Nov 2010 23:30:02 GMT
f__tic Return the number of clock ticks used by the application since the program was launched
f__toc Elapsed seconds since time t (only when f__tic() returns the number of clock ticks elapsed since the program was launched)
f__timeDiff Difference between two time

Functions

f__time

Purpose

Current calendar time of the system in seconds

Parameters

-

Return Value

integer time value

Errors

-

Detailed description

-

f__ctime

Purpose

Convert a time value in seconds to human readable string.  The time represented as local time

Parameters

pl__sec in integer - time value

Return Value

integer converted time value

Errors

-

Detailed description

-

f__ctime__UTC

Purpose

Convert a time value in seconds to human readable string.  The time represented as UTC

Parameters

pl__sec in integer - time value

Return Value

integer converted time value

Errors

-

Detailed description

-

f__getTimeFormatted

Purpose

Return the current calendar time in a formatted way

Parameters

pl__sec in integer - time value
pl__format in charstring - format string

Return Value

charstring formatted time in string format

Errors

-

Detailed description

Specifier / Replaced by / Example

%a Abbreviated weekday name * - Thu
%A Full weekday name * - Thursday
%b Abbreviated month name * - Aug
%B Full month name * - August
%c Date and time representation * - Thu Aug 23 14:55:02 2001
%d Day of the month (01-31) - 23
%H Hour in 24h format (00-23) - 14
%I Hour in 12h format (01-12) - 02
%j Day of the year (001-366) - 235
%m Month as a decimal number (01-12) - 08
%M Minute (00-59) - 55
%p AM or PM designation - PM
%S Second (00-61) - 02
%U Week number with the first Sunday as the first day of week one (00-53) - 33
%w Weekday as a decimal number with Sunday as 0 (0-6) - 4
%W Week number with the first Monday as the first day of week one (00-53) - 34
%x Date representation * - 08/23/01
%X Time representation * - 14:55:02
%y Year, last two digits (00-99) - 01
%Y Year - 2001
%Z Timezone name or abbreviation - CDT
%% A % sign - %
  • The specifiers whose description is marked with an asterisk (*) are locale-dependent.

f__time2sec

Purpose

Function to convert a formated time value to seconds.  The time is expressed as local time.

Parameters

pl__year in integer - year (e.g.  2007)
pl__mon in integer - month (e.g.  3)
pl__day in integer - day (e.g.  7)
pl__hour in integer - day (e.g.  12)
pl__min in integer - day (e.g.  50)
pl__sec in integer - day (e.g.  7)

Return Value

integer time in seconds

Errors

-

Detailed description

time in seconds since January 1, 1900

f__time2sec__UTC

Purpose

Function to convert a formated time value to seconds.  The time is expressed as UTC.

Parameters

pl__year in integer - year (e.g.  2007)
pl__mon in integer - month (e.g.  3)
pl__day in integer - day (e.g.  7)
pl__hour in integer - day (e.g.  12)
pl__min in integer - day (e.g.  50)
pl__sec in integer - day (e.g.  7)

Return Value

integer time in seconds

Errors

-

Detailed description

time in seconds since January 1, 1900

f__getCurrentDateWithOffset

Purpose

Generate a date from the actual date and time plus the parameter in seconds e.g. getSdate(30) will return a charstring containing the date and time of 30 seconds later

Parameters

pl__sec in integer - offset time value

Return Value

charstring formatted time in string format

Errors

-

Detailed description

-

f__getCurrentGMTDate

Purpose

Return the current GMT date in format RFC 1123-Date e.g.:Sat, 13 Nov 2010 23:30:02 GMT

Parameters

-

Return Value

charstring formatted time in string format

Errors

-

Detailed description

-

f__tic

Purpose

Return the number of clock ticks used by the application since the program was launched

OR

Return the amount of CPU time in microseconds since the last call of f__tic

OR ...

Warning!  This function depends on used library version.  Be careful!

Parameters

-

Return Value

integer tics since program start

Errors

-

Detailed description

-

f__toc

Purpose

Elapsed seconds since time t (only when f__tic() returns the number of clock ticks elapsed since the program was launched)

Warning!  This function depends on used library version.  Be careful!

Parameters

t in integer - time value

Return Value

float elapsed seconds

Errors

-

Detailed description

f__tic counts clock tics since program start. f__toc counts seconds since clock() readout in t till current time

f__timeDiff

Purpose

Difference between two time

Parameters

t_start in integer - start time
t_stop in integer - stop time

Return Value

integer t_stop-t_start

Errors

-

Detailed description

-