ftime

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Counter

func Counter() (count int64)

A fast timing counter accessing the cheapest fastest counter your cpu can provide. Guaranteed to increase monotonically across successive calls on the same CPU core. On AMD64 CPUs we use the RDTSC instruction

func IsCounterSMPMonotonic

func IsCounterSMPMonotonic() bool

Indicates whether the results returned from a call to Counter() is guaranteed to be monotonically increasing per CPU and across multiple CPUs on the same socket. No guarantee is made across CPU sockets On AMD64 CPUs we test for the 'Invariant TSC' property using CPUID

func IsCounterSteady

func IsCounterSteady() bool

Indicates whether the results returned from a call to Counter() increase at a uniform rate, independent of the actual clock speed of the CPU it is running on. On AMD64 CPUs we test for the 'Invariant TSC' property using CPUID

func Pause

func Pause(ticks int64)

This method will not return until the value returned by Counter() has increased by ticks. This method is useful as an alternative to time.Sleep() when very short pause periods are desired and it is undesirable to have the current thread/goroutine descheduled.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL