Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# TrueClock Class Reference

An interface to whatever real-time clock we might have available in the current environment. More...

List of all members.

## Public Member Functions
int | getErrorCount ()
| Returns the number of clock errors that have been detected.
double | getLongTime ()
double | getShortRawTime ()
double | getShortTime ()
bool | setCpuAffinity (unsigned int mask)
## Static Public Member Functions
static TrueClock | getGlobalPtr ()
| Returns a pointer to the one TrueClock object in the world.

## Detailed Description

An interface to whatever real-time clock we might have available in the current environment.

There is only one TrueClock in existence, and it constructs itself.

The TrueClock returns elapsed real time in seconds since some undefined epoch. Since it is not defined at what time precisely the clock indicates zero, this value can only be meaningfully used to measure elapsed time, by sampling it at two different times and subtracting.

## Member Function Documentation

int getErrorCount | ( |  | ) |

Returns the number of clock errors that have been detected.

Each time a clock error is detected, in which the value returned by either of the above methods is suspect, the value returned by this method will be incremented. Applications can monitor this value and react, for instance, by resynchronizing their clocks each time this value changes.

static TrueClock getGlobalPtr | ( |  | ) | `[static]`

Returns a pointer to the one TrueClock object in the world.

double getLongTime | ( |  | ) |

double getShortRawTime | ( |  | ) |

double getShortTime | ( |  | ) |

bool setCpuAffinity | ( | unsigned int | mask | ) |

All Classes Namespaces Functions Variables Enumerations Enumerator Properties