Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
Time_Clock Class Reference

This class is to provide a consistant interface and storage to clock time More...

`#include "time_clock.h"`

## Public Member Functions
| Time_Clock (const Time_Clock &timeSrc)
| yet another constructor
| Time_Clock (const timeval &in_mytime)
| Time_Clock (int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds=0, int nDST=-1)
| Construction from parts.
| Time_Clock (long secs, long usecs)
| Constructor that takes in sec and usecs.
| Time_Clock (time_t time)
| The Constructor that take a time_t objext.
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 size_t strftime( char *strDest, size_t maxsize, const char *format, const struct tm *timeptr );.
int | GetDay () const
int | GetDayOfWeek () const
struct tm * | GetGmtTm (struct tm *ptm) const
| Access the stored time and converts 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.
int | GetHour () const
struct tm * | GetLocalTm (struct tm *ptm) const
| Gets The local time in a tm structre from the internal time value.
int | GetMinute () const
int | GetMonth () const
int | GetSecond () const
time_t | GetTime () const
time_t | GetTime_t ()
const timeval & | GetTval ()
const timeval & | GetTval () const
long | GetUsecPart ()
int | GetYear () const
bool | operator!= (const Time_Clock &time) const
| .is time !=
const Time_Clock & | operator+= (const Time_Span &Time_Span)
const Time_Clock & | operator-= (const Time_Span &Time_Span)
bool | operator< (const Time_Clock &time) const
bool | operator<= (const Time_Clock &time) const
const Time_Clock & | operator= (const Time_Clock &timeSrc)
const Time_Clock & | operator= (time_t t)
bool | operator== (const Time_Clock &time) const
bool | operator> (const Time_Clock &time) const
bool | operator>= (const Time_Clock &time) const
void | Set (int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds=0, int nDST=-1)
void | ToCurrentTime ()
| Load this object with the current OS time.

## Static Public Member Functions
static Time_Clock | GetCurrentTime ()
| The Default no param constructor.

## Friends
class | Time_Span

## Detailed Description

This class is to provide a consistant interface and storage to clock time

. Epoch based time to the second

jan-2000 .. rhh changing all time to use sub second timing...

Definition at line 14 of file time_clock.h.

## Constructor & Destructor Documentation

## ◆ Time_Clock() [1/6]

Time_Clock::Time_Clock | ( | const timeval & | in_mytime | ) |
| inline

Definition at line 21 of file time_clock.h.

## ◆ Time_Clock() [2/6]

Time_Clock::Time_Clock | ( |  | ) |
| inline

Definition at line 135 of file time_clock.h.

## ◆ Time_Clock() [3/6]

Time_Clock::Time_Clock | ( | time_t | time | ) |
| inline

The Constructor that take a time_t objext.

Definition at line 266 of file time_clock.h.

## ◆ Time_Clock() [4/6]

Time_Clock::Time_Clock | ( | long | secs,
|  | long | usecs )
| inline

Constructor that takes in sec and usecs.

Definition at line 275 of file time_clock.h.

## ◆ Time_Clock() [5/6]

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

Construction from parts.

Definition at line 83 of file time_clock.h.

## ◆ Time_Clock() [6/6]

Time_Clock::Time_Clock | ( | const Time_Clock & | timeSrc | ) |
| inline

yet another constructor

Definition at line 285 of file time_clock.h.

## Member Function Documentation

## ◆ Format()

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

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

Definition at line 181 of file time_clock.h.

References GetLocalTm().

## ◆ FormatGmt()

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 );.

Definition at line 225 of file time_clock.h.

References GetGmtTm().

## ◆ GetCurrentTime()

Time_Clock Time_Clock::GetCurrentTime | ( |  | ) |
| inline static

The Default no param constructor.

. Will set time to current system time

Definition at line 127 of file time_clock.h.

## ◆ GetDay()

int Time_Clock::GetDay | ( |  | ) | const
| inline

Definition at line 395 of file time_clock.h.

## ◆ GetDayOfWeek()

int Time_Clock::GetDayOfWeek | ( |  | ) | const
| inline

Definition at line 431 of file time_clock.h.

## ◆ GetGmtTm()

struct tm * Time_Clock::GetGmtTm | ( | struct tm * | ptm | ) | const
| inline

Access the stored time and converts 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.

Definition at line 153 of file time_clock.h.

Referenced by FormatGmt().

## ◆ GetHour()

int Time_Clock::GetHour | ( |  | ) | const
| inline

Definition at line 404 of file time_clock.h.

## ◆ GetLocalTm()

struct tm * Time_Clock::GetLocalTm | ( | struct tm * | ptm | ) | const
| inline

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

Definition at line 166 of file time_clock.h.

Referenced by Format().

## ◆ GetMinute()

int Time_Clock::GetMinute | ( |  | ) | const
| inline

Definition at line 413 of file time_clock.h.

## ◆ GetMonth()

int Time_Clock::GetMonth | ( |  | ) | const
| inline

Definition at line 386 of file time_clock.h.

## ◆ GetSecond()

int Time_Clock::GetSecond | ( |  | ) | const
| inline

Definition at line 422 of file time_clock.h.

## ◆ GetTime()

time_t Time_Clock::GetTime | ( |  | ) | const
| inline

Definition at line 369 of file time_clock.h.

## ◆ GetTime_t()

time_t Time_Clock::GetTime_t | ( |  | ) |
| inline

Definition at line 58 of file time_clock.h.

## ◆ GetTval() [1/2]

const timeval & Time_Clock::GetTval | ( |  | ) |
| inline

Definition at line 69 of file time_clock.h.

## ◆ GetTval() [2/2]

const timeval & Time_Clock::GetTval | ( |  | ) | const
| inline

Definition at line 72 of file time_clock.h.

## ◆ GetUsecPart()

long Time_Clock::GetUsecPart | ( |  | ) |
| inline

Definition at line 61 of file time_clock.h.

## ◆ GetYear()

int Time_Clock::GetYear | ( |  | ) | const
| inline

Definition at line 377 of file time_clock.h.

## ◆ operator!=()

bool Time_Clock::operator!= | ( | const Time_Clock & | time | ) | const
| inline

.is time !=

Definition at line 302 of file time_clock.h.

## ◆ operator+=()

const Time_Clock & Time_Clock::operator+= | ( | const Time_Span & | Time_Span | ) |
| inline

Definition at line 42 of file time_general.h.

## ◆ operator-=()

const Time_Clock & Time_Clock::operator-= | ( | const Time_Span & | Time_Span | ) |
| inline

Definition at line 68 of file time_general.h.

## ◆ operator<()

bool Time_Clock::operator< | ( | const Time_Clock & | time | ) | const
| inline

Definition at line 310 of file time_clock.h.

## ◆ operator<=()

bool Time_Clock::operator<= | ( | const Time_Clock & | time | ) | const
| inline

Definition at line 328 of file time_clock.h.

## ◆ operator=() [1/2]

const Time_Clock & Time_Clock::operator= | ( | const Time_Clock & | timeSrc | ) |
| inline

Definition at line 346 of file time_clock.h.

## ◆ operator=() [2/2]

const Time_Clock & Time_Clock::operator= | ( | time_t | t | ) |
| inline

Definition at line 359 of file time_clock.h.

## ◆ operator==()

bool Time_Clock::operator== | ( | const Time_Clock & | time | ) | const
| inline

. is time equal

Definition at line 294 of file time_clock.h.

## ◆ operator>()

bool Time_Clock::operator> | ( | const Time_Clock & | time | ) | const
| inline

Definition at line 319 of file time_clock.h.

## ◆ operator>=()

bool Time_Clock::operator>= | ( | const Time_Clock & | time | ) | const
| inline

Definition at line 337 of file time_clock.h.

## ◆ Set()

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

Definition at line 105 of file time_clock.h.

## ◆ ToCurrentTime()

void Time_Clock::ToCurrentTime | ( |  | ) |
| inline

Load this object with the current OS time.

Definition at line 143 of file time_clock.h.

## Friends And Related Symbol Documentation

## ◆ Time_Span

friend class Time_Span
| friend

Definition at line 15 of file time_clock.h.

The documentation for this class was generated from the following files:

- panda/src/nativenet/time_clock.h
- panda/src/nativenet/time_general.h