Skip to content

Commit

Permalink
Fixed time display
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Jan 9, 2012
1 parent 74a4061 commit 6a08ea8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/engine.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ class Engine
mainloop: (iterate) ->
lastTimestamp = Date.now()
step = (timestamp) =>
dt = (timestamp - lastTimestamp) / 1000
dt = timestamp - lastTimestamp
@frameTimeDisplay.setText dt + 'ms'
iterate dt
iterate dt / 1000
lastTimestamp = timestamp
requestAnimationFrame step
requestAnimationFrame step
Expand Down
2 changes: 1 addition & 1 deletion src/world.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class World
rv.push vbo: vbo, distance: vec3.norm2 distance

rv.sort (a, b) -> a.distance - b.distance
dt = (Date.now() - start) / 1000
dt = Date.now() - start
@displays.chunkStats.setText "visibleVBOs=#{rv.length} chunkUpdate=#{dt}ms"

for info in rv
Expand Down

0 comments on commit 6a08ea8

Please sign in to comment.