Skip to content

incendium.time.get_timer

César Román edited this page Apr 30, 2024 · 1 revision

Description

Get a timer with the time elapsed from value until now.

This will be in the following format: hh:mm:ss.

Syntax

incendium.time.get_timer(date)

Args:

  • date (Date|long): A Date or a date represented in milliseconds.

Returns:

  • str: Time elapsed.

Recommendations

This can be called from a runScript Expression Function to display the elapsed time.

Code Examples

On your project, create a New Package under Scripting > Project Library called app, and then create a New Script called time inside app.

app.time:

import incendium.time


def get_timer(date):
    return incendium.time.get_timer(date)

And then you may reference that inside runScript like this:

# Expression
runScript("app.time.get_timer", 1000, {Starting Date})
Clone this wiki locally