rsc.io/go@v0.0.0-20150416155037-e040fd465409/src/runtime/os_linux_arm64.go (about)

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package runtime
     6  
     7  const (
     8  	_AT_NULL   = 0
     9  	_AT_RANDOM = 25 // introduced in 2.6.29
    10  )
    11  
    12  var randomNumber uint32
    13  
    14  //go:nosplit
    15  func cputicks() int64 {
    16  	// Currently cputicks() is used in blocking profiler and to seed fastrand1().
    17  	// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    18  	// randomNumber provides better seeding of fastrand1.
    19  	return nanotime() + int64(randomNumber)
    20  }