Skip to content

Commit

Permalink
move code and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mkassner committed Aug 12, 2015
1 parent 996cbad commit 2d9afb5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pupil_src/capture/eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ def on_button(window,button, action, mods):
g_pool.gui.update_button(button,action,mods)


window_update_timer = timer(1/60.)
def window_should_update():
return next(window_update_timer)


def on_pos(window,x, y):
hdpi_factor = float(glfwGetFramebufferSize(window)[0]/glfwGetWindowSize(window)[0])
Expand Down Expand Up @@ -265,6 +261,12 @@ def set_display_mode_info(val):
fps_graph.update_rate = 5
fps_graph.label = "%0.0f FPS"


#create a timer to control window update frequency
window_update_timer = timer(1/60.)
def window_should_update():
return next(window_update_timer)

# Event loop
while not g_pool.quit.value:
# Get an image from the grabber
Expand Down

0 comments on commit 2d9afb5

Please sign in to comment.