home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / amiga / programm / 13325 < prev    next >
Encoding:
Text File  |  1992-09-13  |  1.4 KB  |  41 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!uunet.ca!canrem!dosgate!dosgate![barry.fruitman@canrem.com]
  3. From: "barry fruitman" <barry.fruitman@canrem.com>
  4. Subject: alarm clock
  5. Message-ID: <199214.4249.16507@dosgate>
  6. Reply-To: "barry fruitman" <barry.fruitman@canrem.com>
  7. Organization: Canada Remote Systems
  8. Distribution: comp
  9. Date: 14 Sep 92 01:50:21 EST
  10. Lines: 29
  11.  
  12. Hi all.
  13. Can someone out there recommend a good way to implement an alarm clock
  14. into a C program?
  15. The program has a regular (actually, gadtools) IDCMP event loop and the
  16. alarm time could arrive or be altered by the application at any time.
  17. Here are my ideas:
  18.  
  19. 1 - send an I/O request to the Timer UNIT_WAITUNTIL unit, but then how
  20. do I perform a WaitPort() on the IDCMP port and Timer port at the same
  21. time? Can IDCMP messages and Timer device messages share the same port?
  22. If so, how do I know which is coming through?
  23.  
  24. OR
  25.  
  26. 2 - Receive INTUITICKS at my IDCMP port and check the system time there.
  27. But then I run the risk of missing it while doing something else since
  28. the O/S stops sending INTUITICKS when the last one is not responded to.
  29. They will not queue up.
  30.  
  31. Am I in left field or are these ideas good? Which one? Or is there a
  32. better way to do it?
  33.  
  34. Any replies will be appreciated.
  35.  
  36.  
  37. Barry Fruitman
  38. --
  39. Canada Remote Systems  - Toronto, Ontario, Canadas
  40. World's Largest PCBOARD System - 416-629-7000/629-7044
  41.