Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/isida/3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiSabler <dissy@ya.ru>2014-01-01 11:31:40 +0400
committerdiSabler <dissy@ya.ru>2014-01-01 11:31:40 +0400
commita8eac9d2b7136ae5475285134dbd0890d734c23c (patch)
tree2c9eae8e184f444beb6c01809db4a24655b2c62a
parent1ef2455dae2a0aec7af938dbd461cb94dc9fc308 (diff)
fix: time threads type
-rw-r--r--kernel.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel.py b/kernel.py
index fa25626..a56099b 100644
--- a/kernel.py
+++ b/kernel.py
@@ -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