cyberdelia/metrology

Timer clear

Closed this issue · 2 comments

i use the tMetrology.timer('sss')
after i use timer.clear(), the timer.min=0 always, No change

clear will actually reset the timer.
So you want either to use in a context manager or using update:

timer = Metrology.timer('responses')
with timer:
    do_something()

I first use clear. then I use the update, but the timer.min has not changed, always 0