Tekvel Magic
Loading...
Searching...
No Matches
Stopwatch Class Reference

Provides convenient interface to time delay measurements. More...

Inheritance diagram for Stopwatch:

Public Member Functions

def __init__ (self, bool autostart=True)
 
def start (self)
 Starts the stopwatch. More...
 
def split (self, result=None)
 Sets timer split time. More...
 
def stop (self)
 Stops the timer. More...
 
def get_deltas (self, bool as_string=False)
 Returns timedeltas for splits. More...
 

Detailed Description

Provides convenient interface to time delay measurements.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
bool  autostart = True 
)

Member Function Documentation

◆ get_deltas()

def get_deltas (   self,
bool  as_string = False 
)

Returns timedeltas for splits.

The deltas are retured as either an array like [<<T01>>, <<T12>> ... <<Tnm>>] or a formatted string like T01 = XX ms; T12 = YY ms; ... dependent on the as_string parameter.

Parameters
as_stringIf set True the string containing all splits will be retured. Если установлено True отрезки возрващаются в формате одной строки.

◆ split()

def split (   self,
  result = None 
)

Sets timer split time.

◆ start()

def start (   self)

Starts the stopwatch.

◆ stop()

def stop (   self)

Stops the timer.