Skip to content

The Timing Package

Patrick Stephen edited this page Dec 4, 2021 · 2 revisions

One of the sub-packages that Oak provides is timing, which provides miscellaneous time conversion functions for internal use, but exported for anyone else to use:

  • timing.FPSToFrameDelay - converting a frame rate into a time.Duration delay
  • timing.FrameDelayToFPS - converting a time.Duration into a frame rate
  • timing.FPSToNano - converting a frame rate into a nanosecond delay
  • timing.FPS - calculating a frame rate based on the delta between two times.