Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrameRater ¶
type FrameRater struct {
// contains filtered or unexported fields
}
FrameRater implements a frame rate controller
func NewFrameRater ¶
func NewFrameRater(targetFPS uint) *FrameRater
NewFrameRater returns a frame rate controller object for the specified number of target frames per second
func (*FrameRater) FPS ¶
FPS calculates and returns the current measured FPS and the maximum potential FPS after the specified time interval has elapsed. It returns an indication if the results are valid
func (*FrameRater) Start ¶
func (f *FrameRater) Start()
Start should be called at the start of the frame
func (*FrameRater) Wait ¶
func (f *FrameRater) Wait()
Wait should be called at the end of the frame If necessary it will sleep to achieve the desired frame rate
Click to show internal directories.
Click to hide internal directories.