comparison engine/python/fife/extensions/fife_timer.py @ 488:23d01971e9c2

Small fix to fife_timer. The import line didn't work for some reason.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 04 May 2010 12:50:09 +0000
parents 7f1c42b66aa4
children 16ceb3228324
comparison
equal deleted inserted replaced
487:7f1c42b66aa4 488:23d01971e9c2
20 # Free Software Foundation, Inc., 20 # Free Software Foundation, Inc.,
21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 # #################################################################### 22 # ####################################################################
23 23
24 from fife import fife 24 from fife import fife
25 from fife.extensions.pychan.tools import callbackWithArguments as cbwa
26 25
27 """ 26 """
28 Convenient timers 27 Convenient timers
29 ================= 28 =================
30 29
96 95
97 def real_callback(c, t): 96 def real_callback(c, t):
98 t.stop() 97 t.stop()
99 c() 98 c()
100 99
100 from fife.extensions.pychan.tools import callbackWithArguments as cbwa
101 timer.callback = cbwa(real_callback, callback, timer) 101 timer.callback = cbwa(real_callback, callback, timer)
102 timer.start() 102 timer.start()
103 return timer 103 return timer
104 104
105 from traceback import print_exc 105 from traceback import print_exc