 
     // A single frame takes at least 70224 cycles to render
     if cycles_cnt >= 70224 {
-      sdl_step();
+      sdl_render();
       cycles_cnt = 0;
     }
   }

}

def sdl_step() {
  // Render
  sdl_render();

  // Events
  while SDL_PollEvent(_evt) {
    let evt_type = *(_evt as *uint32);
    if evt_type == 0x100 {
      // Quit – App was asked to quit (nicely)

  let cycles_cnt = 0;

  while is_running {
    // Poll window events
    sdl_step();

    // Get elapsed seconds (from start of loop)
    clk += float64(clock() - clk_o) / float64(CLOCKS_PER_SEC);
    clk_o = clock();
