(state: ITimerState)
| 172 | } |
| 173 | |
| 174 | private _setState(state: ITimerState): void { |
| 175 | if (this._state !== state) { |
| 176 | this._state = state |
| 177 | this._onStateChangeCb(this._state) |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | public get state(): ITimerState { return this._state } |
| 182 | public get progress(): number { return this.time / this._duration } |