Example #1
0
File: glfw.go Project: andrebq/glfw
// Time returns the state of a high precision timer. Unless the timer has been
// set by the glfw.SetTime function, the time is measured as the number of
// seconds that have passed since glfwInit was called.
//
// Note: The resolution of the timer depends on which system the program is running on.
func Time() float64 { return float64(C.glfwGetTime()) }
Example #2
0
File: time.go Project: godispy/glfw
// GetTime returns the value of the GLFW timer. Unless the timer has been set
// using SetTime, the timer measures time elapsed since GLFW was initialized.
//
// The resolution of the timer is system dependent, but is usually on the order
// of a few micro- or nanoseconds. It uses the highest-resolution monotonic time
// source on each supported platform.
func GetTime() float64 {
	ret := float64(C.glfwGetTime())
	panicError()
	return ret
}