Skip to content

Commit

Permalink
use new timer interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Frame committed Feb 25, 2016
1 parent 3448ae7 commit 7f500de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Sketch2D.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Sketch2D {

clock.dt = Double(msPerFrame) / 1000.0
oneFrame(clock)
Timers.delay(Int(msPerFrame))
sdl.delay(Int(msPerFrame))

_texture.copyFromSurface(_surface)
_renderer.copyTexture(
Expand All @@ -64,9 +64,9 @@ public class Sketch2D {
}

private func oneFrame(clock: Clock) -> UInt32 {
let frameStart = Timers.getTicks()
let frameStart = sdl.getTicks()
loop(clock)
return Timers.getTicks() - frameStart
return sdl.getTicks() - frameStart
}

public func clear() {
Expand Down

0 comments on commit 7f500de

Please sign in to comment.