Skip to content

v0.5.2 - Friendlier Timer/Counter functions

Choose a tag to compare

@ssweber ssweber released this 12 Apr 19:55
· 13 commits to main since this release
0087056

I kept getting push-back about the 'Tms' IEC TIME style unit names. So why fight it? All the following forms are now allowed:

Argument Aliases Unit
"ms" "milliseconds", "msec" Milliseconds (default)
"sec" "s", "seconds" Seconds
"min" "m", "minutes" Minutes
"hour" "h", "hr", "hours" Hours
"day" "d", "days" Days

Also accepted: Tms/Ts/Tm/Th/Td — great for tag names (FillTimeTm stays short, and Tm sidesteps the minute-vs-minimum ambiguity of Min).

Also loosened things up and allow positional for the arguments in on_delay, off_delay, count_up/down, which really cleans things up:

Before:
on_delay(MyTimer, preset=500, unit="Tms")
After:
on_delay(MyTimer, 500)

Full Changelog: v0.5.1...v0.5.2