fipy.tools.timer¶
Classes
  | 
Context manager that measures time elapsed in context  | 
- class fipy.tools.timer.Timer(timer=None)¶
 Bases:
objectContext manager that measures time elapsed in context
Defaults to nanosecond precision (although probably only microsecond or even millisecond accuracy).
>>> with Timer() as timer: ... pass >>> print("elapsed: {elapsed} ns".format(elapsed=timer.elapsed)) elapsed: ... ns
- Parameters:
 timer (callable, optional) –
Function that returns a time
timer() -> int or floatThe difference between successive calls to
timer()should give the elapsed time at the desired resolution and type. (default:perf_counter_ns())
- static clock_ns()¶
 Substitute “nanosecond” timer for Python 2.7
- property elapsed¶
 Time measured so far
                Last updated on Jun 26, 2024.
                Created using Sphinx 7.1.2.
                
              
        FiPy