Forum Discussion
Altera_Forum
Honored Contributor
14 years agousleep() issue
Hello. In this code: fprintf(lcd_name, string1);
usleep(2000000);
fprintf(lcd_name, string2); second string should appear on LCD after 2 sec. But it appears without any delays! It's interes...
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- Hi my suggestion would be not to use usleep. Instead use the system_clk. For example:
alt_u32 wait_time = alt_nticks() + xxx;
while(wait_time > alt_nticks());Does that make sense? --- Quote End --- This wil possibly improve the precision of time delay but it will not solve Hatter's problem: it's still a blocking loop.