home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!uunet.ca!canrem!dosgate!dosgate![barry.fruitman@canrem.com]
- From: "barry fruitman" <barry.fruitman@canrem.com>
- Subject: alarm clock
- Message-ID: <199214.4249.16507@dosgate>
- Reply-To: "barry fruitman" <barry.fruitman@canrem.com>
- Organization: Canada Remote Systems
- Distribution: comp
- Date: 14 Sep 92 01:50:21 EST
- Lines: 29
-
- Hi all.
- Can someone out there recommend a good way to implement an alarm clock
- into a C program?
- The program has a regular (actually, gadtools) IDCMP event loop and the
- alarm time could arrive or be altered by the application at any time.
- Here are my ideas:
-
- 1 - send an I/O request to the Timer UNIT_WAITUNTIL unit, but then how
- do I perform a WaitPort() on the IDCMP port and Timer port at the same
- time? Can IDCMP messages and Timer device messages share the same port?
- If so, how do I know which is coming through?
-
- OR
-
- 2 - Receive INTUITICKS at my IDCMP port and check the system time there.
- But then I run the risk of missing it while doing something else since
- the O/S stops sending INTUITICKS when the last one is not responded to.
- They will not queue up.
-
- Am I in left field or are these ideas good? Which one? Or is there a
- better way to do it?
-
- Any replies will be appreciated.
-
-
- Barry Fruitman
- --
- Canada Remote Systems - Toronto, Ontario, Canadas
- World's Largest PCBOARD System - 416-629-7000/629-7044
-