Multiple choice technology programming languages

3.) How can I sleep for less than a second?

  1. a) sleep(1/10)

  2. b) Not possible

  3. c) usleep()

  4. d) ssleep()

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

usleep() accepts microseconds, enabling sub-second sleep intervals. Standard sleep() only accepts whole seconds. Options like sleep(1/10) would evaluate to sleep(0) in integer arithmetic.