Created on 28 June 2018
icon_unfollowing
Login to follow
stopwatch-mobile

Stopwatch (Mobile)

Stable version 1.0.0 (Compatible with OutSystems 11)
Other versions available for 10
Uploaded on 16 April 2019 by 
stopwatch-mobile

Stopwatch (Mobile)

Documentation
3.0.0

Basic usage of Stopwatch (Mobile)

Basically with the stopwatch component you can display a stopwatch in your application, with all the functions a normal stopwatch has like start, pause, resume, stop, reset, and get the current time.

The stopwatch component comes with a block that is used to show the time running on the screen, to use it you need to place it inside a container and send the parent container id to the UniqueId input of the block (we will refer to it just as UniqueId), you can use several stopwatches on the same page as long as the parent container id is different for each of them. Besides that the other inputs of the block are just two options that enable or disable the ability to show the hours and tenths of seconds.

Start

The start action receives the UniqueId and the StartTime in milliseconds, this action will start the stopwatch either from 0 or from the start time defined as input. You can use it in any of the screen actions as long as you have the stopwatch block on the screen and the action runs after the screen is rendered, this is valid for all the next actions too.

This action works both as start and resume.

Pause

The pause action basically does what it says it pauses the stopwatch, there's not much more to talk about it you basically pass the UniqueId as input and it pauses the stopwatch.

Reset

The reset action receives the UniqueId and resets the stopwatch to zero. The reset action also stops the stopwatch so if what you want is to reset the timer without stopping it you should use the Start action and send a StartTime of 0 milliseconds.

IsRunning

That action returns true or false according to the stopwatch are currently running or not, it can be useful if you want for example start and pause the stopwatch with the same button, in this case if the actions returns true you would pause or start otherwise (example in the image below).

GetTime

This action like the others before receive the UniqueId and returns you the current time of the stopwatch in milliseconds, so that you can use it for your purpose.

GetTimeAsString

This action works equal to the previous one with the difference that instead of returning the time as an integer in milliseconds, it is returned as a string formatted as it appears on the screen.



Support options
This asset is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from  who created this asset.
Dependencies
See all 1 dependencies