2016-01-27 09:31:24 -07:00
|
|
|
// Copyright 2015 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package runtime
|
|
|
|
|
2017-02-27 00:56:57 -07:00
|
|
|
var hardDiv bool // TODO: set if a hardware divider is available
|
|
|
|
|
2016-01-27 09:31:24 -07:00
|
|
|
func checkgoarm() {
|
|
|
|
return // TODO(minux)
|
|
|
|
}
|
|
|
|
|
|
|
|
//go:nosplit
|
|
|
|
func cputicks() int64 {
|
2016-06-28 10:22:46 -06:00
|
|
|
// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand().
|
2016-01-27 09:31:24 -07:00
|
|
|
// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
|
2016-06-28 10:22:46 -06:00
|
|
|
// TODO: need more entropy to better seed fastrand.
|
2016-01-27 09:31:24 -07:00
|
|
|
return nanotime()
|
|
|
|
}
|