Altera_Forum
Honored Contributor
20 years agoThe usleep seems work incorrect.
Hi All,
The usleep seems work incorrect. int main(argc, argv) int argc; char *argv[]; { unsigned i, idx; for (i = 0; i<1; i++){ for (idx=0;idx<1000;idx++) usleep(10000); } } When usleep() setting below 10000 uS (1 to 9999 uS)this program always spent about 20 seconds, and set it to 10000uS spent about 2 seconds, Why? Please someone help I need using uS delay or sleep in uClinux-NIOSII. Thanks in advance. Best regards,