> 1. In which file is "jiffies" defined?
simple grep will reveal include/linux/sched.h file ;)
> 2. What's the unit of "jiffies"? seconds, ms, or so??
in 1/HZ. And HZ is commonly 100 only 1024 on Alpha AFAIK.
So typicaly one jiffie is 10ms.
> 3. I want to compare the "jiffies" result to TCP_TIMEWAIT_LEN,
> which is defined in "include/net/tcp.h" as "(60*HZ)". What unit
> conversion must I take to compare "jiffies" result with it??
as you can see above - none. 60*HZ is 60 seconds or 60000 jiffies
in i386 system.
> 4. If there are better ways, what're they?
Depends on resolution you want. For sub milisecond precision
use TSC (CPU clock precision). See psched_time_t - it might
help you.
devik
|