Explorar el Código

Update 98_profiler.py

blueloveTH hace 6 meses
padre
commit
839bf0ed1c
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      scripts/98_profiler.py

+ 4 - 4
scripts/98_profiler.py

@@ -1,11 +1,11 @@
-from pkpy import *
 import time
 
 def costly_func(n: int):
-    time.sleep(n)
+    time.sleep(n)               # 2s
+    time.sleep(1)               # 1s
 
 x = 1
 y = 2
-costly_func(2)
+costly_func(2)      # 3s
 
-time.sleep(1)
+time.sleep(1)       # 1s