Files
docker-cli/components/engine/pkg/system/sysconfig.go
Michael Crosby 7aff9b75c9 Use cgo to get systems clock ticks for metrics
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 004cf556e86a03d8961416b3e8a0a476a424b10f
Component: engine
2014-04-21 10:26:22 -07:00

14 lines
178 B
Go

// +build linux,cgo
package system
/*
#include <unistd.h>
int get_hz(void) { return sysconf(_SC_CLK_TCK); }
*/
import "C"
func GetClockTicks() int {
return int(C.get_hz())
}