renpy/doc/reference/functions/renpy.get game runtime

From Ren'Py Visual Novel Engine

Jump to: navigation, search

renpy.get_game_runtime

Function: renpy.get_game_runtime ():

Returns the number of seconds that have elapsed in gameplay since the last call to clear_game_timer, as a float.

The game runtime counter counts the number of seconds that have elapsed while waiting for user input in the current context. (So it doesn't count time spent in the game menu.)

Example

$ minutes, seconds = divmod(int(renpy.get_game_runtime()), 60)
"It took you %(minutes)d minutes and %(seconds)d seconds to
 finish this demo."


Personal tools