mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-29 03:59:58 +00:00
TUN-6724: Migrate to sentry-go from raven-go
This commit is contained in:
22
vendor/github.com/getsentry/sentry-go/internal/ratelimit/deadline.go
generated
vendored
Normal file
22
vendor/github.com/getsentry/sentry-go/internal/ratelimit/deadline.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package ratelimit
|
||||
|
||||
import "time"
|
||||
|
||||
// A Deadline is a time instant when a rate limit expires.
|
||||
type Deadline time.Time
|
||||
|
||||
// After reports whether the deadline d is after other.
|
||||
func (d Deadline) After(other Deadline) bool {
|
||||
return time.Time(d).After(time.Time(other))
|
||||
}
|
||||
|
||||
// Equal reports whether d and e represent the same deadline.
|
||||
func (d Deadline) Equal(e Deadline) bool {
|
||||
return time.Time(d).Equal(time.Time(e))
|
||||
}
|
||||
|
||||
// String returns the deadline formatted for debugging.
|
||||
func (d Deadline) String() string {
|
||||
// Like time.Time.String, but without the monotonic clock reading.
|
||||
return time.Time(d).Round(0).String()
|
||||
}
|
Reference in New Issue
Block a user