summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/http2/timer.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-06-10 07:40:53 +0000
committerLibravatar GitHub <noreply@github.com>2024-06-10 07:40:53 +0000
commit3babb6c0d25b635e95de4aa8572bffa1c7273f88 (patch)
tree31146a952fb29dd2eb936d35a9289e9e023e6dea /vendor/golang.org/x/net/http2/timer.go
parent[chore]: Bump github.com/minio/minio-go/v7 from 7.0.70 to 7.0.71 (#2988) (diff)
downloadgotosocial-3babb6c0d25b635e95de4aa8572bffa1c7273f88.tar.xz
[chore]: Bump golang.org/x/net from 0.25.0 to 0.26.0 (#2986)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.25.0 to 0.26.0. - [Commits](https://github.com/golang/net/compare/v0.25.0...v0.26.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/golang.org/x/net/http2/timer.go')
-rw-r--r--vendor/golang.org/x/net/http2/timer.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/http2/timer.go b/vendor/golang.org/x/net/http2/timer.go
new file mode 100644
index 000000000..0b1c17b81
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/timer.go
@@ -0,0 +1,20 @@
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+package http2
+
+import "time"
+
+// A timer is a time.Timer, as an interface which can be replaced in tests.
+type timer = interface {
+ C() <-chan time.Time
+ Reset(d time.Duration) bool
+ Stop() bool
+}
+
+// timeTimer adapts a time.Timer to the timer interface.
+type timeTimer struct {
+ *time.Timer
+}
+
+func (t timeTimer) C() <-chan time.Time { return t.Timer.C }