gvisorgvisor.dev/gvisor/runsc/starttime Index | Files

package starttime

import "gvisor.dev/gvisor/runsc/starttime"

Package starttime holds the time the `runsc` command started. It is useful in order to plumb this time wherever needed.

Index

Functions

func AppendEnviron

func AppendEnviron(env []string) []string

AppendEnviron appends the RUNSC_START_TIME_NANOS environment variable to the given environment, if it is not already present. Otherwise, it is preserved.

func Get

func Get() time.Time

Get returns the time the `runsc` command started on a best-effort basis. If the RUNSC_START_TIME_NANOS environment variable is set, it is used. Otherwise, it tries to get the time from /proc/self/status. If neither is available, it returns the time the function was first called.

func GoStartTime

func GoStartTime() time.Time

GoStartTime returns the time the `runsc` command's Go code started.

func Timer

func Timer(name string) *timing.Timer

Timer returns a Timer object that is rooted at `runsc` execution start. If `runsc` was re-exec'd, this timer will have a midpoint called "re-exec" that corresponds to the time of the re-exec.

Source Files

starttime.go

Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
43 seconds ago

Tools for package owners.