34 INLINE ulong get_sec()
const;
35 INLINE ulong get_usec()
const;
75 void set_mode(Mode mode);
76 INLINE Mode get_mode()
const;
77 MAKE_PROPERTY(mode, get_mode, set_mode);
80 INLINE
double get_real_time()
const;
81 INLINE
double get_long_time()
const;
84 void set_real_time(
double time);
91 MAKE_PROPERTY(frame_time, get_frame_time, set_frame_time);
92 MAKE_PROPERTY(real_time, get_real_time, set_real_time);
93 MAKE_PROPERTY(long_time, get_long_time);
94 MAKE_PROPERTY(frame_count, get_frame_count, set_frame_count);
97 void set_dt(
double dt);
98 void set_frame_rate(
double frame_rate);
99 MAKE_PROPERTY(dt, get_dt, set_dt);
101 INLINE
double get_max_dt()
const;
102 INLINE
void set_max_dt(
double max_dt);
103 MAKE_PROPERTY(max_dt, get_max_dt, set_max_dt);
105 INLINE
double get_degrade_factor()
const;
106 INLINE
void set_degrade_factor(
double degrade_factor);
107 MAKE_PROPERTY(degrade_factor, get_degrade_factor, set_degrade_factor);
109 INLINE
void set_average_frame_rate_interval(
double time);
110 INLINE
double get_average_frame_rate_interval()
const;
111 MAKE_PROPERTY(average_frame_rate_interval,
112 get_average_frame_rate_interval,
113 set_average_frame_rate_interval);
118 MAKE_PROPERTY(average_frame_rate, get_average_frame_rate);
119 MAKE_PROPERTY(max_frame_duration, get_max_frame_duration);
124 INLINE
bool check_errors(
Thread *current_thread);
129 static void (*_start_clock_wait)();
130 static void (*_start_clock_busy_wait)();
131 static void (*_stop_clock_wait)();
134 void wait_until(
double want_time);
135 static void make_global_clock();
136 static void dummy_clock_wait();
140 double _start_short_time;
141 double _start_long_time;
142 double _actual_frame_time;
144 double _user_frame_rate;
145 double _degrade_factor;
149 double _average_frame_rate_interval;
154 class EXPCL_PANDA_PUTIL CData :
public CycleData {
157 INLINE CData(
const CData ©);
161 return ClockObject::get_class_type();
165 double _reported_frame_time;
166 double _reported_frame_time_epoch;
175 static AtomicAdjust::Pointer _global_clock;
181 static void init_type() {
182 ReferenceCount::init_type();
184 ReferenceCount::get_class_type());
191 EXPCL_PANDA_PUTIL std::ostream &
192 operator << (std::ostream &out, ClockObject::Mode mode);
193 EXPCL_PANDA_PUTIL std::istream &
194 operator >> (std::istream &in, ClockObject::Mode &mode);
A ClockObject keeps track of elapsed real time and discrete time.
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
This class is similar to CycleDataReader, except it allows reading from a particular stage of the pip...
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
A single page of data maintained by a PipelineCycler.
A base class for all things that want to be reference-counted.
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.
An interface to whatever real-time clock we might have available in the current environment.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.