summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/time/time.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-05-27 22:15:54 +0000
committergVisor bot <gvisor-bot@google.com>2021-05-27 22:15:54 +0000
commit965e1415f06bfe9b5ed7cbeb8413005e9b44e40d (patch)
treec66a3ecf71d6419574da3c56fc69ddd31192c69c /pkg/sentry/kernel/time/time.go
parent0680b6d938ae851cb3f1b34a5b710ab5073f91b8 (diff)
parent17df2df75ca092342a29694739d6fbe3bf95b770 (diff)
Merge release-20210518.0-58-g17df2df75 (automated)
Diffstat (limited to 'pkg/sentry/kernel/time/time.go')
-rw-r--r--pkg/sentry/kernel/time/time.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/pkg/sentry/kernel/time/time.go b/pkg/sentry/kernel/time/time.go
index f61a8e164..26aa34aa6 100644
--- a/pkg/sentry/kernel/time/time.go
+++ b/pkg/sentry/kernel/time/time.go
@@ -458,25 +458,6 @@ func NewTimer(clock Clock, listener TimerListener) *Timer {
return t
}
-// After waits for the duration to elapse according to clock and then sends a
-// notification on the returned channel. The timer is started immediately and
-// will fire exactly once. The second return value is the start time used with
-// the duration.
-//
-// Callers must call Timer.Destroy.
-func After(clock Clock, duration time.Duration) (*Timer, Time, <-chan struct{}) {
- notifier, tchan := NewChannelNotifier()
- t := NewTimer(clock, notifier)
- now := clock.Now()
-
- t.Swap(Setting{
- Enabled: true,
- Period: 0,
- Next: now.Add(duration),
- })
- return t, now, tchan
-}
-
// init initializes Timer state that is not preserved across save/restore. If
// init has already been called, calling it again is a no-op.
//