Subject: Re: cost of gettimeofday()
To: Peter Seebach <seebs@plethora.net>
From: Todd Vierling <tv@wasabisystems.com>
List: current-users
Date: 03/08/2002 12:59:03
On Fri, 8 Mar 2002, Todd Vierling wrote:

: : So, if I changed psm.c to call gettimeofday() every time it got a byte of
: : data, check for long delays... Is this a bad idea?
:
: Well, not gettimeofday() per se, but getting the system tick clock as a
: rolling timestamp each time an event fires should be fine, IMHO....

Oh, also, this happens to be the method that some vendor's popular OS uses
to detect if a mouse was unplugged and replugged mid-event (so that it can
recover from a partially-read event, rather than reading all events offset
by N bytes -- which can cause pretty obvious problems).

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/