File: ticks.go

package info (click to toggle)
golang-github-containerd-cgroups 0.0~git20180223.d578e4e-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 352 kB
  • sloc: makefile: 2
file content (10 lines) | stat: -rw-r--r-- 291 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
package cgroups

func getClockTicks() uint64 {
	// The value comes from `C.sysconf(C._SC_CLK_TCK)`, and
	// on Linux it's a constant which is safe to be hard coded,
	// so we can avoid using cgo here.
	// See https://github.com/containerd/cgroups/pull/12 for
	// more details.
	return 100
}