Skip to content

Instantly share code, notes, and snippets.

@carlcarl
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save carlcarl/d263752393a2e9074455 to your computer and use it in GitHub Desktop.

Select an option

Save carlcarl/d263752393a2e9074455 to your computer and use it in GitHub Desktop.
# http://www.coder4.com/archives/1589
scheduler = sched.scheduler(time.time, time.sleep)
def event(action_time):
print 'action_time:%s' % (action_time)
scheduler.enterabs(action_time + 5, 1, event, (action_time + 5,))
inittime = time.time()
scheduler.enterabs(inittime, 1, event, (inittime,))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment