]> git.codecow.com Git - libnemo.git/commitdiff
Merge function used only once privately.
authorChris Duncan <chris@codecow.com>
Mon, 10 Aug 2026 13:26:54 +0000 (06:26 -0700)
committerChris Duncan <chris@codecow.com>
Mon, 10 Aug 2026 13:26:54 +0000 (06:26 -0700)
src/lib/vault/vault-timer.ts

index 0bfe634d17b98c703c814848f1b6d5902d7442d7..bb86e76527bea783d1d7ead5146f9ea2131e9f24 100644 (file)
@@ -33,11 +33,13 @@ export class VaultTimer {
        }
 
        reset (t: number) {
-               this.stop()
+               clearTimeout(this.#timeout)
+               clearInterval(this.#ticker)
                this.#remaining = t
                this.#start = performance.now()
                this.#ticker = setInterval(Function.prototype, 1000)
                this.#timeout = setTimeout(this.#f, this.#remaining)
+               this.#isPaused = false
        }
 
        resume () {
@@ -48,12 +50,4 @@ export class VaultTimer {
                        this.#isPaused = false
                }
        }
-
-       stop () {
-               clearTimeout(this.#timeout)
-               clearInterval(this.#ticker)
-               this.#remaining = 0
-               this.#start = 0
-               this.#isPaused = false
-       }
 }