Microsecond (or one ms) time resolution on an embedded device (Linux Kernel)
Posted
by ChrisDiRulli
on Stack Overflow
See other posts from Stack Overflow
or by ChrisDiRulli
Published on 2010-04-01T23:44:40Z
Indexed on
2010/04/01
23:53 UTC
Read the original article
Hit count: 451
Hey guys,
I have a kernel module I've built that requires at least 1 ms time resolution. I currently use do_gettimeofday() but I'm concerned that this won't work once I move my module to an embedded device. The device has a 180 Mz processor (MIPS) and the default HZ value in the kernel is 100. Thus using jiffies will only give me at best 10 ms resolution. That won't cut it.
What I'd like to know is if do_gettimeofday() is based on the timer interrupt (HZ). Can it be guaranteed to provide at least 1 ms of resolution?
Thanks!
© Stack Overflow or respective owner