Re: SDL-News: Need help for SDL Timer


Subject: Re: SDL-News: Need help for SDL Timer
From: rick reed (rickreed#tseng.co.uk)
Date: Tue Jul 29 2003 - 10:41:06 GMT


Become an SDL Forum Society member <http://www.sdl-forum.org/Society/members.htm>
The originator of this message is responsible for its content.
-----From rick reed <rickreed#tseng.co.uk> to sdlnews -----

on 26/7/03 23:46, Weimin Ma at ponywma#yahoo.com wrote:

> Hello!
>
> I have a question on SDL Timer. Could you please
> give me an example which has a timer set by one
> process
> and consumed or reset by another process?
>
> Many thanks!
>
> Weimin Ma

The answer from Fabrice is correct, but you may wish to consider the
following.

Send the time of expiry in a signal to the process to "consume" the timer.

When the signal is received compare the time with NOW.
If NOW is greater than the sent time the "timer" has expired, otherwise set
a local timer.

Actually you could just set the local timer to the time received in which
case it will expire immmediately.

--
Rick Reed - rickreed#tseng.co.uk
Tel:+44 15394 88462 Fax:+44 15394 88218 Mob:+44 7970 50 96 50

--End text from rick reed <rickreed#tseng.co.uk> to sdlnews --- For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm>



This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:49 GMT