Add-on Directory

Simple Timer Addon - Vaadin Add-on Directory

Simple Timer for Vaadin 14+ Simple Timer Addon - Vaadin Add-on Directory
This component is based on based on this [web component](https://github.com/annsonn/simple-timer), and allows you to define a timer that will produce events reported back to the server, offering a simple API to control it from your Vaadin Flow application. #### What's new in 3.0.0 Version 3.0.0 keeps the timer state on the server, and the web component only renders it. As a result: - The timer keeps counting when it is detached and attached again (for example, inside `Tabs`). - `getElapsed()` and `getRemaining()` return the current value without a round trip to the browser. - The timer value can be shown inside other components with `addDisplay(Component)`. - You can choose whether the timer continues or pauses while detached with `setDetachPolicy`. - If the timer ends while detached, the end is notified when it is attached again. #### Migrating from 2.x - `start()` no longer pauses a running timer. Use `pause()`. - `setStartTime(Number)` and `setEndTime(Number)` are deprecated in favor of `setCountdown(Duration)` and `setCountUp(Duration)`. - `getCurrentTime()` and `getCurrentTimeAsync()` are deprecated in favor of `getElapsed()` and `getRemaining()`, which are computed on the server without a round trip. - `addTimerEndEvent` is deprecated in favor of `addTimerEndListener`. - `addCurrentTimeChangeListener` is deprecated in favor of `addTickListener`. - The web component no longer depends on Polymer, and no longer exposes the `startTime`, `endTime`, `countUp` and `isRunning` properties, nor the `start`, `pause` and `ready` functions. #### Found a bug or have a suggestion? Report it on GitHub For bug reports, feature suggestions, or questions, please open an issue on [GitHub](https://github.com/FlowingCode/SimpleTimerAddon/issues). This makes it easier for us to track and respond efficiently, ensuring you get the best possible support. Your input helps us improve—thank you!
Author Homepage
View on GitHub
Source Code
Issue tracker
Online Demo

Simple Timer Addon version 1.0.0
Initial release

Simple Timer Addon version 2.0.0
First release supporting Vaadin 14+ NPM mode

Simple Timer Addon version 2.0.1
Added support for specifying the format for the remaining time

Simple Timer Addon version 2.1.0
Support for configuring how often the current-time-changed event is fired and add asynchronous getter

Simple Timer Addon version 2.1.1
Release notes: - Implement Serializable

Simple Timer Addon version 2.2.0
#### New features: * Add option to use double digit hours ([#32](https://github.com/FlowingCode/SimpleTimerAddon/issues/32)) * Improve addCurrentTimeChangeListener method documentation ([#26](https://github.com/FlowingCode/SimpleTimerAddon/issues/26))

Simple Timer Addon version 3.0.0
**Breaking changes:** - Timer state is now kept on the server ([#47](https://github.com/FlowingCode/SimpleTimerAddon/pull/47)). See the migration section in the README. **New features:** - Timer keeps counting when detached and attached again ([#39](https://github.com/FlowingCode/SimpleTimerAddon/issues/39)) - Show the timer value in other components with `addDisplay` - Support for Vaadin 25 ([#44](https://github.com/FlowingCode/SimpleTimerAddon/issues/44))