logoalt Hacker News

charcircuityesterday at 6:10 PM0 repliesview on HN

h.frameRateLimit = time.NewTicker(time.Second / time.Duration(fps))

On Windows this only has a resolution of ~0.5ms (down from ~15.6ms when this frame limiting code was written). It also is not synchronized to when frames need to be submitted which means that depending on when the timer is created it can result in the game having stutter.