mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
internal/clock: Use constant time to detect if the game is delayed too much
This commit is contained in:
parent
18ec1d8265
commit
bbb777eecc
@ -90,7 +90,7 @@ func Update(logicFPS int) int {
|
||||
count := 0
|
||||
syncWithSystemClock := false
|
||||
|
||||
if diff > 5*int64(time.Second)/int64(logicFPS) {
|
||||
if diff > int64(time.Second)*5/60 {
|
||||
// The previous time is too old.
|
||||
// Let's force to sync the game time with the system clock.
|
||||
syncWithSystemClock = true
|
||||
|
Loading…
Reference in New Issue
Block a user