Closed fizyk closed 7 years ago
Thanks for the help. It was already possible using the .time()
method but I suppose this is just as convenient :)
Hmm... I was expecting I'd have to fix something, add docstring, becasue that was quickly put up pull request based on our modifications (we subclass Timer class in our project). Or the very least to add some tests.
Anyway, I suppose that's the matter of preferences. With this modifications, you should be safely able to just instantiate the Timer in the with block assign it to a var and use this var in the code block.
I've added some tests and released a new version. Thanks again :)
This allows the timer to be it;'s own context manager while allowing to send intermediate measurments as well (addressing comment in #39 )