summaryrefslogtreecommitdiff
path: root/util/timers/monotonic.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/timers/monotonic.go')
-rw-r--r--util/timers/monotonic.go13
1 files changed, 1 insertions, 12 deletions
diff --git a/util/timers/monotonic.go b/util/timers/monotonic.go
index afe33ae35..2788a6caa 100644
--- a/util/timers/monotonic.go
+++ b/util/timers/monotonic.go
@@ -30,7 +30,7 @@ type Monotonic struct {
}
// MakeMonotonicClock creates a new monotonic clock with a given zero point.
-func MakeMonotonicClock(zero time.Time) WallClock {
+func MakeMonotonicClock(zero time.Time) Clock {
return &Monotonic{
zero: zero,
}
@@ -86,14 +86,3 @@ func (m *Monotonic) Decode(data []byte) (Clock, error) {
func (m *Monotonic) String() string {
return time.Time(m.zero).String()
}
-
-// Since returns the time that has passed between the time the clock was last zeroed out and now
-func (m *Monotonic) Since() time.Duration {
- return time.Since(m.zero)
-}
-
-// DeadlineMonitorAt returns a DeadlineMonitor that expires after the provided delta time from zero has passed.
-// The method must be called after Zero; otherwise, the context's behavior is undefined.
-func (m *Monotonic) DeadlineMonitorAt(at time.Duration) DeadlineMonitor {
- return MakeMonotonicDeadlineMonitor(m, at)
-}