summaryrefslogtreecommitdiff
path: root/vendor/github.com/cenkalti/backoff/v4/timer.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-05-26 16:13:55 +0200
committerLibravatar tobi <kipvandenbos@noreply.codeberg.org>2025-05-26 16:13:55 +0200
commit143febb318ee16ca68ea312249ab5dadeab608bb (patch)
tree594820ce5f746c7c9d0e28cc8820da563b0c4bdd /vendor/github.com/cenkalti/backoff/v4/timer.go
parent[chore] migration to update `statuses.thread_id` to be notnull (#4160) (diff)
downloadgotosocial-143febb318ee16ca68ea312249ab5dadeab608bb.tar.xz
[chore] update dependencies (#4196)
- go.opentelemetry.io/contrib/exporters/autoexport v0.60.0 -> v0.61.0 - go.opentelemetry.io/contrib/instrumentation/runtime v0.60.0 -> v0.61.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4196 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/cenkalti/backoff/v4/timer.go')
-rw-r--r--vendor/github.com/cenkalti/backoff/v4/timer.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/vendor/github.com/cenkalti/backoff/v4/timer.go b/vendor/github.com/cenkalti/backoff/v4/timer.go
deleted file mode 100644
index 8120d0213..000000000
--- a/vendor/github.com/cenkalti/backoff/v4/timer.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package backoff
-
-import "time"
-
-type Timer interface {
- Start(duration time.Duration)
- Stop()
- C() <-chan time.Time
-}
-
-// defaultTimer implements Timer interface using time.Timer
-type defaultTimer struct {
- timer *time.Timer
-}
-
-// C returns the timers channel which receives the current time when the timer fires.
-func (t *defaultTimer) C() <-chan time.Time {
- return t.timer.C
-}
-
-// Start starts the timer to fire after the given duration
-func (t *defaultTimer) Start(duration time.Duration) {
- if t.timer == nil {
- t.timer = time.NewTimer(duration)
- } else {
- t.timer.Reset(duration)
- }
-}
-
-// Stop is called when the timer is not used anymore and resources may be freed.
-func (t *defaultTimer) Stop() {
- if t.timer != nil {
- t.timer.Stop()
- }
-}