diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-07-24 01:03:28 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-24 01:03:28 +0000 |
commit | 16ab991e05d8f511fc6c7e184751fd330e155950 (patch) | |
tree | f6c3ce97f23d8f09d8e3282eb126e9f6b1001f38 /pkg/sentry/kernel/kernel.go | |
parent | 4d5f3fb1a454d4421414a355ff94276e1d6e0fdc (diff) | |
parent | 82a5cada5944390e738a8b7235fb861965ca40f7 (diff) |
Merge release-20200622.1-208-g82a5cada5 (automated)
Diffstat (limited to 'pkg/sentry/kernel/kernel.go')
-rw-r--r-- | pkg/sentry/kernel/kernel.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go index 240cd6fe0..15dae0f5b 100644 --- a/pkg/sentry/kernel/kernel.go +++ b/pkg/sentry/kernel/kernel.go @@ -1469,6 +1469,11 @@ func (k *Kernel) NowMonotonic() int64 { return now } +// AfterFunc implements tcpip.Clock.AfterFunc. +func (k *Kernel) AfterFunc(d time.Duration, f func()) tcpip.Timer { + return ktime.TcpipAfterFunc(k.realtimeClock, d, f) +} + // SetMemoryFile sets Kernel.mf. SetMemoryFile must be called before Init or // LoadFrom. func (k *Kernel) SetMemoryFile(mf *pgalloc.MemoryFile) { |