98_profiler.py 176 B

1234567891011
  1. import time
  2. def costly_func(n: int):
  3. time.sleep(n) # 2s
  4. time.sleep(1) # 1s
  5. x = 1
  6. y = 2
  7. costly_func(2) # 3s
  8. time.sleep(1) # 1s