mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
clock: Fix coments
This commit is contained in:
parent
bbcee77b02
commit
22dfefab5b
@ -62,7 +62,7 @@ func calcCountFromTPS(tps int64, now int64) int {
|
|||||||
|
|
||||||
diff := now - lastSystemTime
|
diff := now - lastSystemTime
|
||||||
if diff < 0 {
|
if diff < 0 {
|
||||||
// It is theoretically possible to change the OS clock, so now can be older than lastSystemTime.
|
// TODO: Should this panic?
|
||||||
lastSystemTime = now
|
lastSystemTime = now
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ func updateFPSAndTPS(now int64, count int) {
|
|||||||
fpsCount++
|
fpsCount++
|
||||||
tpsCount += count
|
tpsCount += count
|
||||||
if now < lastUpdated {
|
if now < lastUpdated {
|
||||||
// It is theoretically possible to change the OS clock, so now can be older than lastSystemTime.
|
// TODO: Should this panic?
|
||||||
lastUpdated = now
|
lastUpdated = now
|
||||||
fpsCount = 0
|
fpsCount = 0
|
||||||
tpsCount = 0
|
tpsCount = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user