diff --git a/bin/curvecalc b/bin/curvecalc --- a/bin/curvecalc +++ b/bin/curvecalc @@ -10,7 +10,7 @@ todo: curveview should preserve more obj """ from __future__ import division -import time,textwrap,math,random,os,optparse +import time,textwrap,math,random,os,optparse, urllib2 import Tix as tk try: from dispatch import dispatcher @@ -77,10 +77,12 @@ class Music: self.recenttime=0 self.player = Agent(reactor) dispatcher.connect(self.seekplay_or_pause,"music seek") + self.timePath = networking.musicPlayer.path("time") def current_time(self): - """return deferred which gets called with the current time""" - d = self.player.request("GET", networking.musicPlayer.path("time")) + """return deferred which gets called with the current + time. This gets called really often""" + d = self.player.request("GET", self.timePath) d.addCallback(self._timeReturned) return d