Panda3D
Public Member Functions | Static Public Member Functions | Friends
Time_Clock Class Reference

List of all members.

Public Member Functions

 Time_Clock (timeval &in_mytime)
 Time_Clock ()
 Return type : inline.
 Time_Clock (time_t time)
 The Constructor that take a time_t objext Return type : inline Argument : time_t time.
 Time_Clock (long secs, long usecs)
 Constructor that takes in sec and usecs.
 Time_Clock (int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, unsigned long microseconds=0, int nDST=-1)
 Construction from parts Argument : int nYear Argument : int nMonth Argument : int nDay Argument : int nHour Argument : int nMin Argument : int nSec Argument : int nDST.
 Time_Clock (const Time_Clock &timeSrc)
 yet another constructor Return type : inline Argument : const Time_Clock& timeSrc
std::string Format (const char *pFormat) const
 Used to allow access to the "C" library strftime functions.
std::string FormatGmt (const char *pFormat) const
 A Wraper to.
int GetDay () const
 Return type : inline int.
int GetDayOfWeek () const
 Return type : inline int.
struct tm * GetGmtTm (struct tm *ptm=NULL) const
 Access the stored time and convers to a struct tm format If storage location is specified then it will stor information in the provided buffer else it will use the library's internal buffer space Return type : struct tm* Argument : struct tm* ptm.
int GetHour () const
 Return type : inline int.
struct tm * GetLocalTm (struct tm *ptm=NULL) const
 Gets The local time in a tm structre from the internal time value.
int GetMinute () const
 Return type : inline int.
int GetMonth () const
 Return type : inline int.
int GetSecond () const
 Return type : inline int.
time_t GetTime () const
 Return type : inline time_t.
time_t GetTime_t ()
const timeval & GetTval ()
const timeval & GetTval () const
unsigned long GetUsecPart ()
int GetYear () const
 Return type : inline int.
bool operator!= (const Time_Clock &time) const
 .is time != Return type : inline bool Argument : const Time_Clock &time
const Time_Clockoperator+= (const Time_Span &Time_Span)
 Return type : inline const Argument : Time_Span &Time_Span.
const Time_Clockoperator-= (const Time_Span &Time_Span)
 Return type : inline const Argument : Time_Span &Time_Span.
bool operator< (const Time_Clock &time) const
 Return type : inline bool Argument : const Time_Clock &time.
bool operator<= (const Time_Clock &time) const
 Return type : inline bool Argument : const Time_Clock &time.
const Time_Clockoperator= (const Time_Clock &timeSrc)
 Return type : inline const Argument : const Time_Clock& timeSrc.
const Time_Clockoperator= (time_t t)
 Return type : inline const Argument : time_t t.
bool operator== (const Time_Clock &time) const
 
bool operator> (const Time_Clock &time) const
 Return type : inline bool Argument : const Time_Clock &time.
bool operator>= (const Time_Clock &time) const
 Return type : inline bool Argument : const Time_Clock &time.
void Set (int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, unsigned long microseconds=0, int nDST=-1)
 Return type : inline Argument : int nYear Argument : int nMonth Argument : int nDay Argument : int nHour Argument : int nMin Argument : int nSec Argument : unsigned long microseconds Argument : int nDST.
void ToCurrentTime ()
 Load this object with the current OS time Return type : inline void Argument : void.

Static Public Member Functions

static Time_Clock GetCurrentTime ()
 The Default no param constructor.

Friends

class Time_Span

Detailed Description

Definition at line 20 of file time_clock.h.


Constructor & Destructor Documentation

Time_Clock::Time_Clock ( ) [inline]

Return type : inline.

Definition at line 169 of file time_clock.h.

Referenced by GetCurrentTime().

Time_Clock::Time_Clock ( time_t  time) [inline]

The Constructor that take a time_t objext Return type : inline Argument : time_t time.

Definition at line 323 of file time_clock.h.

Time_Clock::Time_Clock ( long  secs,
long  usecs 
) [inline]

Constructor that takes in sec and usecs.

Return type : inline Argument : long secs Argument : long usecs

Definition at line 335 of file time_clock.h.

Time_Clock::Time_Clock ( int  nYear,
int  nMonth,
int  nDay,
int  nHour,
int  nMin,
int  nSec,
unsigned long  microseconds = 0,
int  nDST = -1 
) [inline]

Construction from parts Argument : int nYear Argument : int nMonth Argument : int nDay Argument : int nHour Argument : int nMin Argument : int nSec Argument : int nDST.

Definition at line 106 of file time_clock.h.

Time_Clock::Time_Clock ( const Time_Clock timeSrc) [inline]

yet another constructor Return type : inline Argument : const Time_Clock& timeSrc

Definition at line 347 of file time_clock.h.


Member Function Documentation

std::string Time_Clock::Format ( const char *  pFormat) const [inline]

Used to allow access to the "C" library strftime functions.

Return type : std::string Argument : char * pFormat

Definition at line 231 of file time_clock.h.

std::string Time_Clock::FormatGmt ( const char *  pFormat) const [inline]

A Wraper to.

size_t strftime( char *strDest, size_t maxsize, const char *format, const struct tm *timeptr );

Return type : inline std::string Argument : char * pFormat

Definition at line 279 of file time_clock.h.

Time_Clock Time_Clock::GetCurrentTime ( ) [inline, static]

The Default no param constructor.

. Will set time to current system time Return type : Time_Clock

Definition at line 160 of file time_clock.h.

References Time_Clock().

Referenced by Time_Out::Expired(), Time_Out::Remaining(), and Time_Out::ReStart().

int Time_Clock::GetDay ( ) const [inline]

Return type : inline int.

Definition at line 475 of file time_clock.h.

References GetLocalTm().

int Time_Clock::GetDayOfWeek ( ) const [inline]

Return type : inline int.

Definition at line 511 of file time_clock.h.

References GetLocalTm().

struct tm * Time_Clock::GetGmtTm ( struct tm *  ptm = NULL) const [read]

Access the stored time and convers to a struct tm format If storage location is specified then it will stor information in the provided buffer else it will use the library's internal buffer space Return type : struct tm* Argument : struct tm* ptm.

Definition at line 191 of file time_clock.h.

int Time_Clock::GetHour ( ) const [inline]

Return type : inline int.

Definition at line 484 of file time_clock.h.

References GetLocalTm().

struct tm * Time_Clock::GetLocalTm ( struct tm *  ptm = NULL) const [read]

Gets The local time in a tm structre from the internal time value.

Return type : struct tm* Argument : struct tm* ptm

Definition at line 208 of file time_clock.h.

Referenced by GetDay(), GetDayOfWeek(), GetHour(), GetMinute(), GetMonth(), GetSecond(), and GetYear().

int Time_Clock::GetMinute ( ) const [inline]

Return type : inline int.

Definition at line 493 of file time_clock.h.

References GetLocalTm().

int Time_Clock::GetMonth ( ) const [inline]

Return type : inline int.

Definition at line 466 of file time_clock.h.

References GetLocalTm().

int Time_Clock::GetSecond ( ) const [inline]

Return type : inline int.

Definition at line 502 of file time_clock.h.

References GetLocalTm().

time_t Time_Clock::GetTime ( ) const [inline]

Return type : inline time_t.

Definition at line 448 of file time_clock.h.

int Time_Clock::GetYear ( ) const [inline]

Return type : inline int.

Definition at line 457 of file time_clock.h.

References GetLocalTm().

bool Time_Clock::operator!= ( const Time_Clock time) const [inline]

.is time != Return type : inline bool Argument : const Time_Clock &time

Definition at line 368 of file time_clock.h.

const Time_Clock & Time_Clock::operator+= ( const Time_Span Time_Span) [inline]

Return type : inline const Argument : Time_Span &Time_Span.

Definition at line 62 of file time_general.h.

const Time_Clock & Time_Clock::operator-= ( const Time_Span Time_Span) [inline]

Return type : inline const Argument : Time_Span &Time_Span.

Definition at line 99 of file time_general.h.

bool Time_Clock::operator< ( const Time_Clock time) const [inline]

Return type : inline bool Argument : const Time_Clock &time.

Definition at line 379 of file time_clock.h.

bool Time_Clock::operator<= ( const Time_Clock time) const [inline]

Return type : inline bool Argument : const Time_Clock &time.

Definition at line 401 of file time_clock.h.

const Time_Clock & Time_Clock::operator= ( const Time_Clock timeSrc) [inline]

Return type : inline const Argument : const Time_Clock& timeSrc.

Definition at line 423 of file time_clock.h.

const Time_Clock & Time_Clock::operator= ( time_t  t) [inline]

Return type : inline const Argument : time_t t.

Definition at line 437 of file time_clock.h.

bool Time_Clock::operator== ( const Time_Clock time) const [inline]

. is time equal Return type : inline bool Argument : const Time_Clock &time

Definition at line 358 of file time_clock.h.

bool Time_Clock::operator> ( const Time_Clock time) const [inline]

Return type : inline bool Argument : const Time_Clock &time.

Definition at line 390 of file time_clock.h.

bool Time_Clock::operator>= ( const Time_Clock time) const [inline]

Return type : inline bool Argument : const Time_Clock &time.

Definition at line 412 of file time_clock.h.

void Time_Clock::Set ( int  nYear,
int  nMonth,
int  nDay,
int  nHour,
int  nMin,
int  nSec,
unsigned long  microseconds = 0,
int  nDST = -1 
) [inline]

Return type : inline Argument : int nYear Argument : int nMonth Argument : int nDay Argument : int nHour Argument : int nMin Argument : int nSec Argument : unsigned long microseconds Argument : int nDST.

Definition at line 137 of file time_clock.h.

void Time_Clock::ToCurrentTime ( ) [inline]

Load this object with the current OS time Return type : inline void Argument : void.

Definition at line 179 of file time_clock.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations