I want to make a counter from 0 to 2.097152 sec with 1 µsec step.
I tried with time.sleep() but this is not the right solution
I use Python 3.x
Thank you for your help
I want to make a counter from 0 to 2.097152 sec with 1 µsec step.
I tried with time.sleep() but this is not the right solution
I use Python 3.x
Thank you for your help
 
    
    You could have just searched for [python] range float
but anyways:
def msrange(start, stop, step=0.000001):
    while start <= stop:
        yield round(start, 6)
        if start + step > stop:
            yield stop
        start += step
then you can:
for i in msrange(0, 0.00003):
    print(i)
output:
0
1e-06
2e-06
3e-06
...
3e-05
