Skip to main content

Module time

Module time 

Source
Expand description

Intervals and durations, shared by market summary --every and watchlists, so both read 30s the same way and have the same defaults (#47, Q7).

Constants§

DEFAULT_DURATION_SECS
Default total duration of a repeat (1 hour).
DEFAULT_INTERVAL_SECS
Default interval between runs (60 seconds).
UNTIL_CANCELLED
Duration words that mean “until the user stops it” (#96).

Functions§

format_duration
The shortest text that parse_duration reads back as secs.
is_until_cancelled
forever or inf, in any case.
parse_duration
Parses 30s, 5m, 1h, 2d or a bare number of seconds into whole seconds. Zero and negative values are errors.