Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!think.com!mintaka!spdcc!ima!dirtydog!ima.isc.com!brian From: rowan@ima.isc.com (Rowan Hawthorne) Newsgroups: comp.windows.x.motif Subject: Re: delay loop Keywords: XtAddTimeOut Message-ID: <1990Dec13.201435.1457@dirtydog.ima.isc.com> Date: 13 Dec 90 20:14:35 GMT References: <1990Dec13.170905.21902@sctc.com> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Reply-To: brian@ima.isc.com Distribution: comp.windows.x.motif comp.windows.x Organization: Interactive Systems, Cambridge, MA 02138 Lines: 23 In article <1990Dec13.170905.21902@sctc.com>, pasturel@sctc.com (Pierre Pasturel) writes: |> |> I want to use XtAddTimeOut to cause a delay X in msec in a callback by |> doing this: |> |> timer_id = XtAddTimeOut(X,delay_done,NULL); |> |> while ( done == FALSE ) { |> } |> |> where delay_done is the processing procedure which will set the done flag |> to TRUE when X msecs have expired. The problem is, the while loop |> sits in a tight loop forever and the Time Out never occurs. How about calling XtNextEvent and XtProcessEvent in that loop, instead of having a tight loop? Rowan Email rowan@ima.isc.com Phone 617-661-7474 x206 Fax 617-661-2070 upstream from the last bend in the Charles River