#include <oscl_time.h>
Public Methods | |
OSCL_COND_IMPORT_REF | TimeValue () |
Create a TimeValue representing the current time. | |
OSCL_COND_IMPORT_REF | TimeValue (const TimeValue &Tv) |
Copy constructor. | |
OSCL_COND_IMPORT_REF | TimeValue (long tv, TimeUnits units) |
Create a TimeValue representing an interval of tv units. | |
OSCL_COND_IMPORT_REF | TimeValue (const OsclBasicTimeStruct &in_tv) |
Create a TimeValue representing the absolute time specified by the BasicTimeStruct. | |
OSCL_COND_IMPORT_REF | TimeValue (OsclBasicDateTimeStruct in_ts) |
Create a TimeValue representing the absolute time specified by the BasicDateTimeStruct. | |
OSCL_COND_IMPORT_REF int32 | get_local_time () |
Get the local time after having adjusted for daylight saving. | |
OSCL_COND_IMPORT_REF void | set_to_zero () |
Set the time value to zero (represents a zero interval). | |
OSCL_COND_IMPORT_REF void | set_to_current_time () |
Set the time value to the current system time. | |
OSCL_COND_IMPORT_REF void | set_from_ntp_time (const uint32 ntp_offset) |
This method coverts a 32-bit NTP offset to system time. | |
OSCL_COND_IMPORT_REF uint32 | get_sec () const |
Get a 32 bit value representing the seconds since the (system dependent) epoch. | |
OSCL_COND_IMPORT_REF int32 | to_msec () const |
OSCL_COND_IMPORT_REF uint32 | get_usec () const |
Get a 32 bit value representing the number of microseconds in the time value. | |
OSCL_IMPORT_REF char * | get_str_ctime (CtimeStrBuf ctime_strbuf) |
Get a string containing a text representation of this TimeValue object. | |
OSCL_IMPORT_REF int | get_pv8601_str_time (PV8601timeStrBuf time_strbuf) |
Get a PV extended text representation of the Time based on the ISO 8601 format. | |
OSCL_IMPORT_REF char * | get_rfc822_gmtime_str (int max_time_strlen, char *time_str) |
Get a text representation of the time in the GMT timezone based on the RFC 822 / RFC 1123 (also described in the HTTP spec RFC 2068 and RFC 2616. | |
OSCL_COND_IMPORT_REF bool | is_zero () |
Determine if the time value is zero. | |
OSCL_COND_IMPORT_REF TimeValue & | operator= (const TimeValue &a) |
Assignment operator. | |
OSCL_COND_IMPORT_REF TimeValue & | operator+= (const TimeValue &a) |
+= operator | |
OSCL_COND_IMPORT_REF TimeValue & | operator-= (const TimeValue &a) |
-= operator | |
OSCL_COND_IMPORT_REF TimeValue & | operator *= (const int scale) |
This operator scales the time value by a constant. | |
OSCL_COND_IMPORT_REF OsclBasicTimeStruct * | get_timeval_ptr () |
Friends | |
class | NTPTime |
OSCL_COND_IMPORT_REF friend bool | operator== (const TimeValue &a, const TimeValue &b) |
OSCL_COND_IMPORT_REF friend bool | operator!= (const TimeValue &a, const TimeValue &b) |
OSCL_COND_IMPORT_REF friend bool | operator<= (const TimeValue &a, const TimeValue &b) |
OSCL_COND_IMPORT_REF friend bool | operator>= (const TimeValue &a, const TimeValue &b) |
OSCL_COND_IMPORT_REF friend bool | operator< (const TimeValue &a, const TimeValue &b) |
OSCL_COND_IMPORT_REF friend bool | operator> (const TimeValue &a, const TimeValue &b) |
This class provides common time functions independent of any OS. The actual representation used is native to the system that the class is compiled on to increase efficiency. Macros used in this class:
|
Create a TimeValue representing the current time.
|
|
Copy constructor.
|
|
Create a TimeValue representing an interval of tv units.
|
|
Create a TimeValue representing the absolute time specified by the BasicTimeStruct.
|
|
Create a TimeValue representing the absolute time specified by the BasicDateTimeStruct.
|
|
Get the local time after having adjusted for daylight saving. Notes: Implementation incomplete (= not done) on Win32, Wince, Symbian |
|
Get a PV extended text representation of the Time based on the ISO 8601 format.
|
|
Get a text representation of the time in the GMT timezone based on the RFC 822 / RFC 1123 (also described in the HTTP spec RFC 2068 and RFC 2616.
|
|
Get a 32 bit value representing the seconds since the (system dependent) epoch.
|
|
Get a string containing a text representation of this TimeValue object.
|
|
|
|
Get a 32 bit value representing the number of microseconds in the time value.
|
|
Determine if the time value is zero.
|
|
This operator scales the time value by a constant.
|
|
+= operator
|
|
-= operator
|
|
Assignment operator.
|
|
This method coverts a 32-bit NTP offset to system time. This method takes a 32-bit ntp offset which is the number of seconds from 0 h Jan 1, 1900 and converts it to the system time |
|
Set the time value to the current system time.
|
|
Set the time value to zero (represents a zero interval).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|