Commits

Ada Young committed 0de0111

Now using world.DoAfterSpecial to wait instead of sleep() which hung everything while it slept

  • Participants
  • Parent commits 2f590fb

Comments (0)

Files changed (1)

 <![CDATA[
 import sqlite3
 import cPickle
+from random import uniform
 from datetime import datetime
 
 import Tkinter
 
 from tkFileDialog import asksaveasfilename, askopenfilename
 
-from time import sleep
-from random import uniform
-
 def Note(message): # not writing world.Note everywhere ^_^
     world.Note(message)
 
 newslist = []
 resultset = []
 resultindex = 0
+flipflop = False
 
 def ProcessNewsList():
-    sleep(uniform(1, 3))
+    sleeptime = uniform(1, 3)
+    global flipflop
+    if flipflop:
+        world.DoAfterSpecial(sleeptime, "ProcessNewsList()", 12)
+        flipflop = False
+        return
+    else:
+        flipflop = True
     if len(newslist) > 0:
         world.EnableTrigger("NewsPreamble", True)
         world.EnableTrigger("NewsPostambleLost", True)