'Why does the time process to complete the program differ between usleep and sleep in c?
#include<stdio.h>
main()
{
printf("Sleep for 5 milisecond to exit.\n");
sleep(0.005);
printf("usleep for 5 milisecond to exit.\n");
usleep(5000);
return 0;
}
the sleep function takes more time to execute comparatively to the usleep function which takes seconds?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
