On Mon, Jul 30, 2001 at 06:36:58PM -0400, List Monkey wrote:
> 
> Mutexes would indded be the way to go if it makes sense for your
> achitecture.
> 
> Another approach is to base your time on SYSTEM UPTIME.  This is available
> by writing a little hack to read the kernel global "jiffies", or read
>  /proc/uptime

Hmmm ... this is an approach I hadn't thought of ... it might just work.
Is there a portable way to get system uptime?
 
> If the server is always online, you could just query the NIST atomic clock

*chuckle*  It's an idea, but I think it's a little more overhead than 
I wanted.  8)

> Make a separate thread that just sleeps some small time, increments a
> global counter atomically, ad infinitum.

The problem with this approach is that if the CPU gets loaded, the
timing starts (potentially) getting off.  The more consistent the high load,
the more askew the timing becomes.  

Decent approach though.

-- 
Give a person a fish and you feed them for a day.
Give a person access to the net and they won't bother you for weeks.
-- Internet proverb

Cole Tuininga
Network Admin
Code Energy, Inc
[EMAIL PROTECTED]
(603) 766-2208
PGP Key ID: 0x43E5755D



**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to