The Global Clock

The global clock is an instance of the ClockObject class.

It gets imported into the global namespace when you import the direct.directbase.DirectStart module or create an instance of the ShowBase class.

To get the time (in seconds) since the last frame was drawn:

dt = globalClock.getDt()

Another useful function is the frame time (in seconds, since the program started):

frameTime = globalClock.getFrameTime()

Note

This section is incomplete. It will be updated soon.