i have a python project that should check a situation repeatedly in a certain time and it must check it under 3ms at least.But unfortunately my code checks it in between 14ms-16ms so it is not working.But it was working before i updated my windows to 2004 and now i can't fix the problem.I tried removing updates and all but didnt work.
Here is an example code:
import time
now=time.perf_counter()
lastpoint=3
c=1
while now<lastpoint:
time.sleep(0.001)
now=time.perf_counter()
print(now*1000)
'''
and conclusion i take from this code is ;
29.2068
44.878
60.378800000000005
75.90679999999999
91.5121
107.0237
122.6039
138.3594
...
2950.1692
2965.7764
2981.4248000000002
2997.0353
3012.6643
as you can see it checks in almost every 15ms how could i fix this?