#ifndef __TIME_H__ #define __TIME_H__ void time_init(); void time_tick(); /** * @brief Get the real-time clock value. * Note that this value will constantly update and change, so don't expect this value to remain consistent during a single frame. * @return The real-time clock value in 20,12 format. */ u_long time_getRealTime(); /** * @brief Get the current frame count. * This is the number of frames that were counted, i.e. the number of main loop iterations since application start. * @return The current frame's number in 32,0 format. */ u_long time_getFrameNumber(); /** * @brief Get the current frame start time. * The real-time value at which the current frame was started. Unlike time_getRealTime(), this value remains consistent for the entire frame. * @return The current frame's start time in 20,12 format. */ u_long time_getFrameTime(); /** * @brief Get the delta time between frames. * The amount of real time passed between the last frame and the current frame. Use this for framerate-independent time stepping. * @return The frame delta time in 4,12 format. */ u_short time_getDeltaTime(); /** * @brief Get the average frame rate. * The average framerate calculated over 16 frames. This gets updated periodically so isn't always entirely current. * @return The average frame rate in 8,8 format. */ u_short time_getFrameRate(); #endif // __TIME_H__