Timer

Timer Modes

Stopwatch (single user)

Stopwatch (synchronized across users)

Countdown from value

Countdown to a specific date/time

Timer format

Date/Time toggles

Timer Autostart

Timer Actions

Examples:

Timer Actions API

Timers can work as indicators of time spent, meeting timers or countdowns. They can be extended to trigger actions at certain times as well.

Take a look at a timer example here 

Timers can be added from the Pencil+ menu.

Timer Modes

Stopwatch (single user)

The timer will start at 0 and display the time since it was started. In this mode, each user will have its own timer, the value is not shared. This mode is useful for single user experiences, as well as measuring time for one user.

Stopwatch (synchronized across users)

This mode behaves like the normal stopwatch, but it is synchronized across all users in the space. It will start and stop for everyone. It’s useful for measuring activities, like meetings.

Countdown from value

When started, the timer will count down from the value. Useful for creating time constraints for user tasks.

Countdown to a specific date/time

This mode will display the remaining time to a specified date/time in the future. Or it will count time since the date if it’s in the past. Useful to display a countdown for a launch event.

Timer format

Controls what’s displayed on the timer. Values are DD:HH:MM:SS or Full text.

Date/Time toggles

Using the toggles, the timer can display or hide different parts of the date/time (days, hours, minutes, seconds).

Timer Autostart

If checked, the timer will start when the user enters the experience. Except for the Synchronized Stopwatch mode: In this mode, if autostart is checked, the timer will only start when 2+ users join the space.

Timer Actions

The timer will trigger actions when a certain value is reached. Multiple actions can be configured. The field accepts a JSON with key-values representing ‘time expression’ and ‘actions to execute’.

{
        
"time expression": <action to execute>
}

Time expression is evaluated against the amount of seconds measured from the start of the timer, and the value is always seconds. For example, a timer displaying 00:01:05 will use a value (seconds) of 65. So if an action is required to execute after 1 minute and 5 seconds, the time expression will be ‘>65’. If the timer is displaying a countdown the time will be negative.

The <action to execute> part can be one action definition or an array of actions.

Examples:

  1. Display a notification when the timer reaches 1 minute:

{
        
">60": {"action":"displayNotification", "message":"You reached 1 minute"}
}

  1. Display a notification when the timer reaches 0 (in a countdown):

{
        
"==0": {"action":"displayNotification", "message":"Time is over"}
}

  1. Multiple actions: Display notification and reveal a hidden object after 5 minutes:

{
        
">300": [
                {
"action":"displayNotification", "message":"The door has been opened"},
                {
"action":"setObjectVisible", "objectName":"Door", "visible":true}
                ]
}

  1. Multiple actions at different times (5 and 10 minutes).

{
        
">600": {"action":"displayNotification", "message":"Your session has expired"},
        
">300": [
                {
"action":"displayNotification", "message":"The door has been opened"},
                {
"action":"setObjectVisible", "objectName":"Door", "visible":true}
                ]
}

Timer Actions API

There are several actions to interact with timers (pause, resume). Check the Timer actions in the Scenario Actions document.

How useful was this article?

Click on a star to rate it!

We are sorry that this article was not useful for you!

Let us improve this article!

Tell us how we can improve this article?