STPW[0] - STPW[9]


STPW[0]S
STPW[1]S
STPW[0-1]S
Starts the stopwatch.

STPW[0]E
STPW[1]E
STPW[0-1]E
Stops the stopwatch.

STPW[0]C
STPW[1]C
STPW[0-1]C
Continues measuring after stopping.

STPW[0]@
STPW[1]@
Sends the measured time to STDOUT in milliseconds.
STPW[0]0@
STPW[0]1@
STPW[0]2@
STPW[0]3@
Sends the measured time to STDOUT in seconds.

STPW[0]=10000
Sets the elapsed time in milliseconds. STPW[0]C continues measuring from here. Useful in combination with the NVR command.



Examples

Starting and stopping via GPIO input.
GPIO[D5]INP|
GPIO[D6]INP|
GPIO[D5]CL:STPW[0]S;LED(ON);STD@Start!|
GPIO[D6]CL:STPW[0]E;LED(OFF);STPW[0]2@


Operation time meter with TM1637 display.
STPW[0]=NVR[0]|
TIMES:*STR[0]=%STPW[0];*NVR[0]=STR[0]|
TM1637[0](STPW[0])|
STPW[0]C