[Python-ideas] Timer that starts as soon as it is imported

Oleg Broytman phd at phdru.name
Tue May 26 21:08:01 CEST 2015


On Tue, May 26, 2015 at 09:24:37PM +0300, anatoly techtonik <techtonik at gmail.com> wrote:
> On Tue, May 26, 2015 at 9:21 PM, Chris Angelico <rosuav at gmail.com> wrote:
> > On Wed, May 27, 2015 at 4:05 AM, anatoly techtonik <techtonik at gmail.com> wrote:
> >>> -- if it could be reset and restarted at need -- why not start it
> >>>    manually in the first place?
> >>
> >> Current ways of measuring script run-time are not cross-platform or
> >> not memorizable. I have to reinvent timer code a couple of times, and
> >> that's not convenient for the code that is only relevant while debugging.
> >
> > Sounds to me like something that doesn't belong in the stdlib, but
> > makes a great utility module for private use.
> 
> There are a lot of helpers like this that might be useful. Installing them
> separately is a lot of hassle - it is easy to forget some.

   Incorporate them into your main repository as submodules.

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-ideas mailing list