Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- count=0
- while True:
- sample_rate=5000
- time_start=time.perf_counter()
- count+=1
- while (time.perf_counter()-time_start) < (1/sample_rate):
- pass
- if count == sample_rate:
- print(1/(time.perf_counter()-time_start))
- count=0
Add Comment
Please, Sign In to add comment