Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12745 Discussions

The usleep seems work incorrect.

Altera_Forum
Honored Contributor II
1,076 Views

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,
0 Kudos
0 Replies
Reply