- Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
It would be helpful if there was a way to start the timer when it is instantiated, such as t = Timer().start() or t = Timer(now=True).
This can reduce the number of required lines from 3 to 2 which is nice when inserting many timers.
t=Timer().start() # code block 1t.stop() t=Timer().start() # code block 2t.stop() t=Timer().start() # code block 3t.stop()To do this, either .start() would need to return self or a Timer.__post_init__ function would need to if self.now == True.
Metadata
Metadata
Assignees
Labels
No labels