MCPcopy Index your code
hub / github.com/Shopify/go-lua / clock

Function clock

unix.go:9–15  ·  view source on GitHub ↗
(l *State)

Source from the content-addressed store, hash-verified

7)
8
9func clock(l *State) int {
10 var rusage syscall.Rusage
11 _ = syscall.Getrusage(syscall.RUSAGE_SELF, &rusage) // ignore errors
12 l.PushNumber(float64(rusage.Utime.Sec+rusage.Stime.Sec) + float64(rusage.Utime.Usec+rusage.Stime.Usec)/1000000.0)
13 return 1
14
15}

Callers

nothing calls this directly

Calls 1

PushNumberMethod · 0.80

Tested by

no test coverage detected