示例#1
0
文件: glfw.go 项目: 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()) }
示例#2
0
文件: time.go 项目: 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
}