On Fri, Mar 6, 2009 at 1:34 PM, Raz <raziebe@xxxxxxxxx> wrote: > On Fri, Mar 6, 2009 at 8:17 PM, Asim <linkasim@xxxxxxxxx> wrote: >> I need it for a device. The device performs some operation in a loop >> but I cannot wait in that loop forever, so I need to wait for the >> maximum time I can (2 clock ticks) before giving up on the device. >> Interrupts may be disabled so I cannot use jiffies. Any simple >> solution would be appreciated. > so why not use getnstimeofday ? > Or better yet, why not use some kind of lock to protect your shared resource but allow the cpu do other work. Disabling interrupts for 2 ticks is just not desired. If you did that you could easily look at jiffies. Greg -- Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ