Logo Search packages:      
Sourcecode: gameclock version File versions  Download package

def gameclock::Clock::stop (   self  ) 

Stop the timer

This computes the new cumulatative time based on the start
timestamp. It resets the timestamp to zero to mark the timer as
stopped.

This also resets the event box's color and triggers an update of
the label.

XXX: Note that this function takes *some* time to process. This
time is lost and not given to any participant. Maybe that should
be fixed for the clock to be really precised, by compensation
for the duration of the function.

Another solution would be to create a thread for the Game engine

Definition at line 75 of file gameclock.py.

00075                   :
        """Stop the timer
        
        This computes the new cumulatative time based on the start
        timestamp. It resets the timestamp to zero to mark the timer as
        stopped.
        
        This also resets the event box's color and triggers an update of
        the label.
        
        XXX: Note that this function takes *some* time to process. This
        time is lost and not given to any participant. Maybe that should
        be fixed for the clock to be really precised, by compensation
        for the duration of the function.
        
        Another solution would be to create a thread for the Game engine
        """
        if self.last_start:
            self.time = self.get_time()
            self.last_start = 0
            if self.game.fisher:
                self.time += self.game.fisher
        self.update()

    def pause(self):


Generated by  Doxygen 1.6.0   Back to index