python> Microsecond sleep> import time / usleep = lambda x: time.sleep (x / 1000000.0) / usleep (100)

I want to use sleep in microseconds with pi2.

http://stackoverflow.com/questions/5568646/usleep-in-python

usleep.py


import time
usleep = lambda x: time.sleep(x/1000000.0)

usleep(100) #sleep during 100μs

Once usleep () is defined, it's easier to run.

Recommended Posts

python> Microsecond sleep> import time / usleep = lambda x: time.sleep (x / 1000000.0) / usleep (100)
[Lambda] Make import requests available [python]