summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/state/state_unsafe.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/state/state_unsafe.go')
-rw-r--r--pkg/sentry/state/state_unsafe.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/state/state_unsafe.go b/pkg/sentry/state/state_unsafe.go
index 53814ef70..3ff7d24c8 100644
--- a/pkg/sentry/state/state_unsafe.go
+++ b/pkg/sentry/state/state_unsafe.go
@@ -23,7 +23,8 @@ import (
"gvisor.googlesource.com/gvisor/pkg/abi/linux"
)
-func cpuTime() (time.Duration, error) {
+// CPUTime returns the CPU time usage by Sentry and app.
+func CPUTime() (time.Duration, error) {
var ts syscall.Timespec
_, _, errno := syscall.RawSyscall(syscall.SYS_CLOCK_GETTIME, uintptr(linux.CLOCK_PROCESS_CPUTIME_ID), uintptr(unsafe.Pointer(&ts)), 0)
if errno != 0 {