Skip to content

textmode.js / Textmodifier / secs

Accessor: secs

Get Signature

ts
get secs(): number;

Seconds since the sketch started running.

secs is a convenience property that returns the elapsed time in seconds instead of milliseconds. Equivalent to millis / 1000.

Time tracking begins before the code in setup runs. If loading screen is enabled, secs begins tracking as soon as the loading screen starts.

This property is connected to millis - setting one will affect the other.

Returns

number

Seconds since the sketch started.

Examples

Set Signature

ts
set secs(value): void;

Set elapsed seconds by adjusting the internal start time.

This allows seeking/scrubbing in animations. Setting secs will also affect the value returned by millis since they are connected.

Parameters

ParameterTypeDescription
valuenumberNew elapsed time in seconds.

Returns

void

Example