Sobes.tech
Junior — Senior

Context manager for measuring code execution duration

livecode

Task condition

Create a context manager that will record and display the time spent executing code within a with statement.

  • When entering the with block, start a timer.
  • When exiting the with block, calculate the elapsed time and display it.
  • The result should be displayed in seconds with millisecond precision.
Context manager for measuring code execution duration… - sobes.tech