Xref: utzoo comp.windows.x:31776 comp.windows.x.motif:1714 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!cs.utexas.edu!execu!sequoia!unisql!yu From: yu@unisql.UUCP (Yeong-Ho Yu) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: Timer Interrupt Keywords: Timer, Event handler Message-ID: <1100@unisql.UUCP> Date: 23 Jan 91 23:56:00 GMT Followup-To: poster Organization: UniSQL, Inc. Lines: 28 I am trying to make a main event handler which will run for at least the given time, and returns the control back to the program. That is, it should be a temparary XtAppMainLoop. I made up the following function: void TempEventH(XtAppContext app, unsigned int time) { XEvent event; XtAppAddTimeOut(app, time, NULL, NULL); /* put up a timer event */ while(!(XtAppPending(app) & XtIMTimer)){ /* until it arrives */ XtAppNextEvent(app, &event); /* do the event processing */ XtDispatchEvent(&event); } } Of course, it does not work. But, I don't know why. Any suggestions? Many thanks in advance. -- Yeong-Ho Yu Internet: execu!sequoia!unisql!yu@cs.utexas.edu UUCP: {uunet, cs.utexas.edu!execu}!sequoia!unisql!yu