Changeset f959488 in flowtimer for flowtimer/Schedule.py


Ignore:
Timestamp:
08/17/24 22:48:01 (9 months ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
guix
Children:
daa2276
Parents:
3b76475
Message:

Schedule can be initialized with a list of Phases and RecurringPhaseSequences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • flowtimer/Schedule.py

    r3b76475 rf959488  
    3232        if (self.current_phase.finished()) and (self.phase_list[-1] == self.current_phase):
    3333            self.state = "finished"
     34            print("Finished")
    3435            return True
    3536        else:
     
    4344            self.current_phase = self.phase_list[index+1]
    4445
    45     def time_left(self):
    46         return self.current_phase.time_left + sum([phase.time_left for phase in self.upcoming_phases()])
     46    def ticks_left(self):
     47        return (self.current_phase.ticks_left +
     48                sum([phase.ticks_left for phase in self.upcoming_phases()]))
    4749
    4850    def upcoming_phases(self):
Note: See TracChangeset for help on using the changeset viewer.