Skip to content

Add restart parameter to tic #1

@htarnacki

Description

@htarnacki

hi,
i propose small improvement:

instead of:

>> t.tic()
>> t.toc(restart=True)
Elapsed time is 36.986837 seconds.
>>t.toc(restart=True)
Elapsed time is 2.393425 seconds
>>t.toc(restart=True)
Elapsed time is 2.393425 seconds
>>t.toc(restart=True)
Elapsed time is 2.393425 seconds
...

it would be great to have such an option:

t.tic(restart=True)
>> t.toc()
Elapsed time is 36.986837 seconds.
>>t.toc()
Elapsed time is 2.393425 seconds
>>t.toc()
Elapsed time is 2.393425 seconds
>>t.toc(restart=False)
Elapsed time is 2.393425 seconds

or

t.tic(restart=True)
>> t.toc()
Elapsed time is 36.986837 seconds.
>>t.toc()
Elapsed time is 2.393425 seconds
>>t.toc()
Elapsed time is 2.393425 seconds
t.finaltoc()
Elapsed time is 2.393425 seconds

or

t.tic()
>> t.rtoc()
Elapsed time is 36.986837 seconds.
>>t.rtoc()
Elapsed time is 2.393425 seconds
>>t.rtoc()
Elapsed time is 2.393425 seconds
>>t.toc()
Elapsed time is 2.393425 seconds

where "rtoc" means "restartable toc"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions