please anyone tell me how to use sleep() for few milliseconds in swift 2.2?
while (true){
print("sleep for 0.002 seconds.")
sleep(0.002) // not working
}
but
while (true){
print("sleep for 2 seconds.")
sleep(2) // working
}
it is working.