Skip to contentSkip to conversation

delay programming

DISCUSSION hangtoo 1 participant 1 message May 25, 2006

lore
Share & tools
lore

hangtoo

author
#0 lore raw

hi,
yes,you are right.the usleep didn't give out accurate delay.so I make a delay funtion to fix it.
thank you for you help.:)
regards
tony

That depends on how accurate you want. Sleep() functions can't be too accurate for Linux schedule characteristic. To get best accuracy, you can use hardware timer. udelay() is a choice which reduces the overall system performance.

Best Regards,
Leo

Quoted 22 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of tony
Sent: Wednesday, May 24, 2006 5:24 PM
To: [email protected]
Subject: delay programming

hi all
I want to delay 1ms in the program,
does usleep(1000) works accurate?
any good idea?

regards
tony

_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded