Class: $.FieldTimerEventsView

Inherits:
WatchUi.DataField show all

Overview

DataField View class to show the current lap number

Constant Summary

TimerState

Name Value Since Description
STATE_STOPPED 0
STATE_PAUSED 1
STATE_RUNNING 2

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _lapCertainty as Lang.String

var _lapNumber as Lang.Number

var _timerState as FieldTimerEventsView.TimerState

Instance Method Details

compute(info as Activity.Info) as Void

The given info object contains all the current workout information. Calculate a value and save it locally in this method.

Parameters:

  • info —

    Activity.Info object

initialize()

Constructor

onNextMultisportLeg() as Void

This is called each time a Multisport activity advances to the next leg. Reset the laps

onTimerLap() as Void

This is called each time a lap is created, so increment the lap number.

onTimerPause() as Void

The timer was started, so set the state to running.

onTimerReset() as Void

The timer was reset, so reset all our tracking variables

onTimerResume() as Void

The timer was stopped, so set the state to stopped.

onTimerStart() as Void

The timer was started, so set the state to running.

onTimerStop() as Void

The timer was stopped, so set the state to stopped.

onUpdate(dc as Graphics.Dc) as Void

Display the value you computed here. This will be called once a second when the data field is visible.

Parameters:

  • dc —

    Device Context

onWorkoutStepComplete() as Void

This is called each time a Workout Step finishes, so increment the lap number.


Generated Jun 9, 2026, 8:45:41 AM