diff options
author | diSabler <dissy@ya.ru> | 2014-01-01 11:31:40 +0400 |
---|---|---|
committer | diSabler <dissy@ya.ru> | 2014-01-01 11:31:40 +0400 |
commit | a8eac9d2b7136ae5475285134dbd0890d734c23c (patch) | |
tree | 2c9eae8e184f444beb6c01809db4a24655b2c62a | |
parent | 1ef2455dae2a0aec7af938dbd461cb94dc9fc308 (diff) |
fix: time threads type
-rw-r--r-- | kernel.py | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1450,12 +1450,10 @@ def getRoom(jid): def now_schedule(): while not game_over: to = GT('schedule_time') - while to > 0 and not game_over: - to -= 1 - time.sleep(1) - if not game_over: - for tmp in gtimer: - if not game_over: thr(tmp,(),('time_thread_%s' % tmp).split(' ',2)[1]) + while int(time.time()) % to and not game_over: time.sleep(0.5) + for tmp in gtimer: + if not game_over: thr(tmp,(),('time_thread_%s' % tmp).split(' ',2)[1]) + else: break def check_rss(): global rss_processed |