Created
August 13, 2013 11:17
-
-
Save yanmhlv/6220164 to your computer and use it in GitHub Desktop.
tornado.ioloop.PeriodicCallback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.ioloop | |
count = 0 | |
def print_hello(): | |
global count | |
print(count, "Hello") | |
count += 1 | |
timer = tornado.ioloop.PeriodicCallback(print_hello, 300) | |
timer.start() | |
if __name__ == '__main__': | |
tornado.ioloop.IOLoop.instance().start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment