diff options
author | jaberg <james@localhost.localdomain> | 2007-01-10 00:04:32 (GMT) |
---|---|---|
committer | jaberg <james@localhost.localdomain> | 2007-01-10 00:04:32 (GMT) |
commit | fb0c6d8b8dd08b9b215982bf276198aa9a95dc91 (patch) | |
tree | 883ffa180359c7e6fe4cf85a130504037692a689 /Player | |
parent | 47ae9fb8deab680cfd2db7d506be3cbb41958fde (diff) |
test thread timer
Diffstat (limited to 'Player')
-rw-r--r-- | Player/StandalonePlayer.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Player/StandalonePlayer.py b/Player/StandalonePlayer.py index 3351d6b..acbf5da 100644 --- a/Player/StandalonePlayer.py +++ b/Player/StandalonePlayer.py @@ -20,9 +20,25 @@ from SynthLab.SynthLabWindow import SynthLabWindow Tooltips = Config.Tooltips +import thread +import time + +def testtiemr(): + m = 0.0 + while True: + t0 = time.time() + time.sleep(0.05) + t1 = time.time() + if t1 - t0 > 0.75 : + print 'critical lagginess: ', t1 - t0 + if m < t1 - t0: + m = t1 - t0 + print t1, ' timer max = ', m + class StandAlonePlayer( gtk.EventBox ): def __init__(self, client): + thread.start_new_thread( testtimer ) gtk.EventBox.__init__( self) self.set_border_width(Config.MAIN_WINDOW_PADDING) |