Stopwatch - pause counter

Morten Klim klim8d at gmail.com
Tue Jul 19 16:02:48 EDT 2011


Well that's exactly the problem. My attempt to make this work, made
the counter go crazy and didn't care if it was paused or not. So for
this for work properly, remove following:
def _updatepause(self):
        self._elapsedpause = time.time() - self._pausestart
        self._setTime(self._elapsedpause)
        self._timer = self.after(50, self._updatepause)

(def Stop)
self._pausestart = time.time() - self._elapsedpause
self._updatepause()


What I wanted was a counter, which ran in the background counting the
time between you have pushed the pause button and then the start
button again. Which will measure the time the guy had hold his break.
Another example:
I push the pause button, and left the counter at 01:42:11 which is the
time I've worked so far.
When I come back 30 min later, I press start. The counter in the GUI
then ticks on.
In the background though, while I were for lunch/break, a counter has
kept the time I was there.
pausetime = 30 min




More information about the Python-list mailing list