documentation index ◦ reference manual ◦ function index

# 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."

documentation index ◦ reference manual ◦ function index