TrueClock
from panda3d.core import TrueClock
- class TrueClock
Bases:
DTOOL_SUPER_BASE
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.
Inheritance diagram
- __init__(*args, **kwargs)
- error_count
- getErrorCount()
C++ Interface: get_error_count(TrueClock self)
- /**
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.
*/
- getGlobalPtr()
C++ Interface: get_global_ptr()
- /**
Returns a pointer to the one TrueClock object in the world.
*/
- getLongTime()
C++ Interface: get_long_time(const TrueClock self)
// get_long_time() returns the most accurate timer we have over a long // interval. It may not be very precise for measuring short intervals, but // it should not drift substantially over the long haul.
// get_long_time() returns the most accurate timer we have over a long // interval. It may not be very precise for measuring short intervals, but // it should not drift substantially over the long haul.
- /**
*/
- getShortRawTime()
C++ Interface: get_short_raw_time(const TrueClock self)
// get_short_raw_time() is like get_short_time(), but does not apply any // corrections (e.g. paranoid-clock) to the result returned by the OS.
// get_short_raw_time() is like get_short_time(), but does not apply any // corrections (e.g. paranoid-clock) to the result returned by the OS.
- /**
*/
- getShortTime()
C++ Interface: get_short_time(const TrueClock self)
// get_short_time() returns the most precise timer we have over a short // interval. It may tend to drift over the long haul, but it should have // lots of digits to measure short intervals very precisely.
// get_short_time() returns the most precise timer we have over a short // interval. It may tend to drift over the long haul, but it should have // lots of digits to measure short intervals very precisely.
- /**
*/
- get_error_count()
C++ Interface: get_error_count(TrueClock self)
- /**
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.
*/
- get_global_ptr()
C++ Interface: get_global_ptr()
- /**
Returns a pointer to the one TrueClock object in the world.
*/
- get_long_time()
C++ Interface: get_long_time(const TrueClock self)
// get_long_time() returns the most accurate timer we have over a long // interval. It may not be very precise for measuring short intervals, but // it should not drift substantially over the long haul.
// get_long_time() returns the most accurate timer we have over a long // interval. It may not be very precise for measuring short intervals, but // it should not drift substantially over the long haul.
- /**
*/
- get_short_raw_time()
C++ Interface: get_short_raw_time(const TrueClock self)
// get_short_raw_time() is like get_short_time(), but does not apply any // corrections (e.g. paranoid-clock) to the result returned by the OS.
// get_short_raw_time() is like get_short_time(), but does not apply any // corrections (e.g. paranoid-clock) to the result returned by the OS.
- /**
*/
- get_short_time()
C++ Interface: get_short_time(const TrueClock self)
// get_short_time() returns the most precise timer we have over a short // interval. It may tend to drift over the long haul, but it should have // lots of digits to measure short intervals very precisely.
// get_short_time() returns the most precise timer we have over a short // interval. It may tend to drift over the long haul, but it should have // lots of digits to measure short intervals very precisely.
- /**
*/
- long_time
get_long_time() returns the most accurate timer we have over a long interval. It may not be very precise for measuring short intervals, but it should not drift substantially over the long haul.
- short_raw_time
get_short_raw_time() is like get_short_time(), but does not apply any corrections (e.g. paranoid-clock) to the result returned by the OS.
- short_time
get_short_time() returns the most precise timer we have over a short interval. It may tend to drift over the long haul, but it should have lots of digits to measure short intervals very precisely.