add accumulation of captured time
This commit is contained in:
@@ -42,3 +42,8 @@ class TimeSlot():
|
||||
|
||||
def end_now(self):
|
||||
self.end = datetime.now()
|
||||
|
||||
def duration(self) -> datetime.timedelta:
|
||||
end = self.end
|
||||
if not end: end = datetime.now()
|
||||
return self.end - self.start
|
||||
|
||||
Reference in New Issue
Block a user