starttime

package
v0.0.0-...-8eb8f9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 7 Imported by: 3

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL