Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
utils.print_timings Class Reference
Inheritance diagram for utils.print_timings:

Public Member Functions

def __init__ (self)
 
def __enter__ (self)
 
def __exit__ (self, t, v, tb)
 

Detailed Description

Definition at line 27 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

def utils.print_timings.__init__ (   self)

Definition at line 28 of file utils.py.

28 def __init__(self):
29 self._start = None
30

Member Function Documentation

◆ __enter__()

def utils.print_timings.__enter__ (   self)

Definition at line 31 of file utils.py.

31 def __enter__(self):
32 self._start = datetime.datetime.utcnow()
33 print('Task started at %s GMT' % str(self._start))
34
def print(*args, **kwargs)
Definition: run_tests.py:49

◆ __exit__()

def utils.print_timings.__exit__ (   self,
  t,
  v,
  tb 
)

Definition at line 35 of file utils.py.

35 def __exit__(self, t, v, tb):
36 finish = datetime.datetime.utcnow()
37 duration = (finish-self._start).total_seconds()
38 print('Task finished at %s GMT (%f seconds)' % (str(finish), duration))
39
40

The documentation for this class was generated from the following file: