Releases: dniklaus/spin-timer
Releases · dniklaus/spin-timer
3.0.1 Doc fixes
SpinTimer 3.0
SpinTimer 3.0 is the next major update of wiring-timer.
Main changes since 2.9.0:
- new naming (files and class names) to avoid clashes with other timers being around
- project name: wiring-timer -> spin-timer
- class names: Timer -> SpinTimer, TimerContext -> SpinTimerContext, TimerAdapter -> SpinTimerAction
- API update:
- the adapter is now an action (TimerAdapter -> SpinTimerAction), but having still timeExpired() method to be implemented
- new methods:
- getInterval(), to read back the currently set interval time
- setIsRecurring(), to change the behavior also after construction
- constructor parameter list re-ordered and small changes with their defaults:
- timeInterval has no default anymore, needs to be explicitly set, no auto start when set >0
- isAutoStart (default: false) as new parameter to control the behavior explicitly, new helper constants:
- SpinTimer::IS_NON_AUTOSTART = false
- SpinTimer::IS_AUTOSTART = true
- introduction of Unit Tests, running as GitHub Action