netdev
[Top] [All Lists]

Re: about time measurement

To: Laurence <laudney@xxxxxxxx>
Subject: Re: about time measurement
From: Martin Devera <devik@xxxxxx>
Date: Sat, 16 Feb 2002 20:01:00 +0100 (CET)
Cc: Netdev <netdev@xxxxxxxxxxx>
In-reply-to: <200202161022.g1GAMP925927@xxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
> 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


<Prev in Thread] Current Thread [Next in Thread>