Module ncine.frame_timer
The table containing frame timer related functions
Functions
ncine.frame_timer.total_number_frames () | Returns the total number of frames rendered since the application started |
ncine.frame_timer.last_frame_duration () | Returns the time in seconds that last frame took to complete |
ncine.frame_timer.current_frame_duration () | Returns the elapsed time in seconds since current frame started |
ncine.frame_timer.average_fps () | Returns the average FPS during the update interval |
ncine.frame_timer.average_frame_time () | Returns the average frame time in seconds during the update interval |
ncine.frame_timer.is_average_enabled () | Returns true if the average FPS calculation is enabled |
ncine.frame_timer.is_logging_enabled () | Returns true if logging of averages is enabled |
ncine.frame_timer.get_average_interval () | Returns the number of seconds between two average FPS calculations |
ncine.frame_timer.set_average_interval (interval) | Sets the number of seconds between two average FPS calculations |
ncine.frame_timer.get_logging_interval () | Returns the number of seconds between two logging events. |
ncine.frame_timer.set_logging_interval (interval) | Sets the number of seconds between two logging events |
ncine.frame_timer.get_log_level () | Returns the level for the logging events |
ncine.frame_timer.set_log_level (log_level) | Sets the level for the logging events |
Functions
- ncine.frame_timer.total_number_frames ()
-
Returns the total number of frames rendered since the application started
Returns:
-
integer
- ncine.frame_timer.last_frame_duration ()
-
Returns the time in seconds that last frame took to complete
Returns:
-
number
- ncine.frame_timer.current_frame_duration ()
-
Returns the elapsed time in seconds since current frame started
Returns:
-
number
- ncine.frame_timer.average_fps ()
-
Returns the average FPS during the update interval
Returns:
-
number
- ncine.frame_timer.average_frame_time ()
-
Returns the average frame time in seconds during the update interval
Returns:
-
number
- ncine.frame_timer.is_average_enabled ()
-
Returns
true
if the average FPS calculation is enabledReturns:
-
boolean
- ncine.frame_timer.is_logging_enabled ()
-
Returns
true
if logging of averages is enabledReturns:
-
boolean
- ncine.frame_timer.get_average_interval ()
-
Returns the number of seconds between two average FPS calculations
Returns:
-
number
- ncine.frame_timer.set_average_interval (interval)
-
Sets the number of seconds between two average FPS calculations
Parameters:
- interval number
- ncine.frame_timer.get_logging_interval ()
-
Returns the number of seconds between two logging events.
A different and independent average is calculated over this time interval.
Returns:
-
number
- ncine.frame_timer.set_logging_interval (interval)
-
Sets the number of seconds between two logging events
Parameters:
- interval number
- ncine.frame_timer.get_log_level ()
-
Returns the level for the logging events
Returns:
-
ncine.log_level
- ncine.frame_timer.set_log_level (log_level)
-
Sets the level for the logging events
Parameters:
- log_level ncine.log_level