dial_core.utils.timer module

class dial_core.utils.timer.Timer[source]

Bases: object

Class used for timing the milliseconds elapsed on a block of code.

Variables:
  • start – Moment in time when the execution started.
  • end – Moment in time when the execution finished.
  • running – If the block of code is still being executed.
__enter__()[source]

Starts tracking time.

__exit__(*args)[source]

Stops tracking time.

elapsed()[source]

Get the elapsed time (in milliseconds).

Return type:int
interval()[source]

Returns the interval betweent the start and end

Return type:timedelta