Skip to content

Commit

Permalink
Add comments for getClockTicks
Browse files Browse the repository at this point in the history
Signed-off-by: Qiang Huang <[email protected]>
  • Loading branch information
hqhq committed Jul 1, 2017
1 parent c3fc2b7 commit 8254e02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ticks.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,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
}

0 comments on commit 8254e02

Please sign in to comment.