Forum Discussion
Altera_Forum
Honored Contributor
20 years agousing udelay()?
Hi All,
Can I direct using udelay()? Which time base be used in udelay()? Thanks in advance. Best regards,1 Reply
- Altera_Forum
Honored Contributor
In kernelspace you can use the udelay (microseconds delay) and mdelay (milliseconds delay) functions.
In userspace ("normal" uClinux C application) you can use the common usleep (microseconds delay) and sleep(seconds delay) function. I haven't personally used the sleep bu I have used usleep and udelay and they worked like a charm! So it depends on what you're writing... When in doubt i'd say go for usleep. You have to include unistd.h in order to use usleep.