nanogui: Bug in srvclip2.c


Previous by date: 3 Oct 2000 19:00:06 -0000 Re: MS-DOS mouse driver not working., Greg Haerr
Next by date: 3 Oct 2000 19:00:06 -0000 Re: Bug in srvclip2.c, Greg Haerr
Previous in thread: 3 Oct 2000 19:00:06 -0000 Re: Bug in srvclip2.c, Greg Haerr
Next in thread: 3 Oct 2000 19:00:06 -0000 Re: Bug in srvclip2.c, Greg Haerr

Subject: Re: Bug in srvclip2.c
From: Alex Holden ####@####.####
Date: 3 Oct 2000 19:00:06 -0000
Message-Id: <Pine.LNX.4.04.10010031946030.572-100000@hyperspace.linuxhacker.org>

On Tue, 3 Oct 2000, Greg Haerr wrote:
> The easiest way to handle this will be to create a new call,
> GetNextEventTimeout(), which will use the timeout value
> in the client's existing select() code; quite simple.  If select()
> returns with a timeout, I'll create a GR_EVENT_TYPE_TIMEOUT
> and return it from GetNextEventTimeout().

If I understood it right though, I think he wants to wait for a specific
requested time rather than "when the next event happens, or we time out
waiting for one". Which means that unless you want to rely on select()
modifying the timeout value (something which isn't portable to a lot of
non-Linux systems and wouldn't take account of the time spent in the
client between GrGetNextEvent() calls), you'll have to work out the
absolute time of the timeout on the first call (add the timeout to the
result of a gettimeofday() call), then do another gettimeofday() to
recalculate the timeout every time you call select().

-- 
--------------- Linux- the choice of a GNU generation. --------------
: Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :
-------------------- http://www.linuxhacker.org/ --------------------



Previous by date: 3 Oct 2000 19:00:06 -0000 Re: MS-DOS mouse driver not working., Greg Haerr
Next by date: 3 Oct 2000 19:00:06 -0000 Re: Bug in srvclip2.c, Greg Haerr
Previous in thread: 3 Oct 2000 19:00:06 -0000 Re: Bug in srvclip2.c, Greg Haerr
Next in thread: 3 Oct 2000 19:00:06 -0000 Re: Bug in srvclip2.c, Greg Haerr


Powered by ezmlm-browse 0.20.