func EndOfFrame() {
	now := glfw.GetTime()
	previousElapsed := now - previousTime
	mu.Lock()
	times[i] = previousElapsed
	frames++
	i++
	if i >= numAveragedFrameLengths {
		i = 0
	}
	mu.Unlock()
	// Sleep for as long as we need to...
	time.Sleep(time.Duration((float64(time.Second) / framerateCap) - (float64(time.Second) * previousElapsed)))
}
// EndOfFrame is intended to be called at the end of the frame with the current time. This function will block to maintain the intended maximum frame rate.
EndOfFrame is intended to be called at the end of the frame with the current time. This function will block to maintain the intended maximum frame rate.
// EndOfFrame is intended to be called at the end of the frame with the current time . This function will block to maintain the intended maximum frame rate .
func EndOfFrame() {
	now := glfw.GetTime()
	previousElapsed := now - previousTime
	mu.Lock()
	times[i] = previousElapsed
	frames++
	i++
	if i >= numAveragedFrameLengths {
		i = 0
	}
	mu.Unlock()
	time.Sleep(time.Duration((float64(time.Second) / framerateCap) - (float64(time.Second) * previousElapsed)))
}
func EndOfFrame ( ) { now := glfw . GetTime ( ) previousElapsed := now - previousTime mu . Lock ( ) times [ i ] = previousElapsed frames ++ i ++ if i >= numAveragedFrameLengths { i = 0 } mu . Unlock ( ) time . Sleep ( time . Duration ( ( float64 ( time . Second ) / framerateCap ) - ( float64 ( time . Second ) * previousElapsed ) ) ) }
EndOfFrame is intended to be called at the end of the frame with the current time.
EndOfFrame is intended to be called at the end of the frame with the current time .
// Sleep for as long as we need to...