Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!metro!seagoon.newcastle.edu.au!wombat.newcastle.edu.au!c8927218 From: c8927218@wombat.newcastle.edu.au Newsgroups: comp.sys.amiga.programmer Subject: Message-ID: <1991May24.102345.1@wombat.newcastle.edu.au> Date: 24 May 91 00:23:45 GMT Sender: news@neddy.newcastle.edu.au Organization: University of Newcastle, AUSTRALIA Lines: 24 I have a question, which is hard to explain, but perhaps easy to answer. I have a program which updates info on the screen every second. Its exitable by clicking on the close gadget of its window. Currently I am delaying by Delay(60) and then checking the windows message port for a message, outputting my info, then looping back to the Delay. The problem is, if the user clicks on the close gadget, it could be a second before the program responds (since its in a delay) and hence if I move the delay up, which I want to...then it could be 5secs or more before the window closes. So the basic idea is, how can I start a timed event that will pump a signal to me when it completes, so that I can have the program waiting for a signal from that timer or from the window message port...hence if the user clicks on the close gadget, it immediately can respond ? Assembly or C answers.... Thanks, Robert Lang.