spacepy.toolbox.eventTimer

spacepy.toolbox.eventTimer(Event, Time1)[source]

Times an event then prints out the time and the name of the event, nice for debugging and seeing that the code is progressing

Parameters:
Eventstr

Name of the event, string is printed out by function

Time1time.time

the time to difference in the function

Returns:
Time2time.time

the new time for the next call to EventTimer

Examples

>>> import spacepy.toolbox as tb
>>> import time
>>> t1 = time.time()
>>> t1 = tb.eventTimer('Test event finished', t1)
('4.40', 'Test event finished')