Skip to content

secondselapsed string

Chris Petersen edited this page Oct 16, 2014 · 1 revision

secondselapsed->string returns time string in hh:mm:ss format. Useful in clock displays.

Parameter Description
arg1 Relative time in seconds
arg2 Optional: Time format, such as "hh:mm")

Example

Example 1: Clock value of 1234 seconds

> (secondselapsed->string 1234) 
"00:20:34"

Example 2: Store a duration string, in mm:ss format, as the difference of a start time value and now.

 (set! duration (secondselapsed->string (fix (- ##now start)) "%M:%S"))))
Clone this wiki locally