#!/usr/bin/env python
# -*- coding:utf-8 -*-
import threading
def time_thread():
print "执行了业务逻辑"
t = threading.Timer(1, time_thread)
t.start()
time_thread()
执行结果如下:每隔1秒钟进行打印
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import threading
def time_thread():
print "执行了业务逻辑"
t = threading.Timer(1, time_thread)
t.start()
time_thread()
执行结果如下:每隔1秒钟进行打印