sciris.sc_datetime.tic

tic()[source]

With sc.toc(), a little pair of functions to calculate a time difference:

Examples:

sc.tic()
slow_func()
sc.toc()

T = sc.tic()
slow_func2()
sc.toc(T, label='slow_func2')

See also sc.timer().