netdev
[Top] [All Lists]

about time measurement

To: Netdev <netdev@xxxxxxxxxxx>
Subject: about time measurement
From: Laurence <laudney@xxxxxxxx>
Date: Sat, 16 Feb 2002 17:24:58 +0800
Organization: SJTU
Reply-to: laudney@xxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
Hi,
        I'm trying to measure how long a particular socket has been
around. My plan is to record "jiffies" at the creation process of
the socket. Then, when I want to measure, I record again "jiffies"
in another variable and calculate the result. But I'm having the
following problems:
1. In which file is "jiffies" defined?
2. What's the unit of "jiffies"? seconds, ms, or so??
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??
4. If there are better ways, what're they?

Thanks a lot in advance.


-- Laudney



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