Using timers

Timers can be used to track how much time has been spend working on something.

To start a timer for a user:

user = # Get a user from ftrack.
task = # Get a task from ftrack.


A timer has now been created for that user and should show up in the ftrack web UI.

To stop the currently running timer for a user and create a timelog from it:

user = # Get a user from ftrack.

timelog = user.stop_timer()


Starting a timer when a timer is already running will raise in an exception. Use the force parameter to automatically stop the running timer first.

user.start_timer(task, force=True)