This adds two clock interfaces: sys.Walltime and sys.Nanotime to allow implementations to override readings for purposes of security or determinism. The default values of both are a fake timestamp, to avoid the sandbox break we formerly had by returning the real time. This is similar to how we don't inherit OS Env values.
8 lines
88 B
Go
8 lines
88 B
Go
//go:build !cgo
|
|
|
|
package platform
|
|
|
|
func nanotime() int64 {
|
|
return nanotimePortable()
|
|
}
|