mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
Update 98_profiler.py
This commit is contained in:
parent
d44a6b7a44
commit
839bf0ed1c
@ -1,11 +1,11 @@
|
|||||||
from pkpy import *
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
def costly_func(n: int):
|
def costly_func(n: int):
|
||||||
time.sleep(n)
|
time.sleep(n) # 2s
|
||||||
|
time.sleep(1) # 1s
|
||||||
|
|
||||||
x = 1
|
x = 1
|
||||||
y = 2
|
y = 2
|
||||||
costly_func(2)
|
costly_func(2) # 3s
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1) # 1s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user