[comp.sys.mac.programmer] How to write an alarm clock program?

hamdyz@prism.CS.ORST.EDU (Zikif Hamdy) (12/30/90)

I am writing a clock application (MultiFinder aware) and I have a problem how
to check an alarm. The current version is I keep comparing the alarm againts
the current time while I am idle (no event pending).

My questions are :
	How do you check the alarm in the most efficient way? 
	By this I mean I won't miss the alarm no matter where I am or what
	other programs are doing (in background, in foreground).

	If I have to use clock/time interrupt, how could I do it? (sample
	of code will be appreciated). What documentation do I have to read?

Thank you very much in advance.

Zikif Hamdy
hamdyz@prism.cs.orst.edu
----------------------------

Zikif.Hamdy@f20.n226.z1.FIDONET.ORG (Zikif Hamdy) (12/30/90)

Reply-To: hamdyz@prism.CS.ORST.EDU


I am writing a clock application (MultiFinder aware) and I have a problem how
to check an alarm. The current version is I keep comparing the alarm againts
the current time while I am idle (no event pending).

My questions are :
        How do you check the alarm in the most efficient way? 
        By this I mean I won't miss the alarm no matter where I am or what
        other programs are doing (in background, in foreground).

        If I have to use clock/time interrupt, how could I do it? (sample
        of code will be appreciated). What documentation do I have to read?

Thank you very much in advance.

Zikif Hamdy
hamdyz@prism.cs.orst.edu
----------------------------

 + Organization: Oregon State Univ. -- Computer Science

--  
Zikif Hamdy - via FidoNet node 1:105/14
    UUCP: ...!{uunet!glacier, ..reed.bitnet}!busker!226!20!Zikif.Hamdy
INTERNET: Zikif.Hamdy@f20.n226.z1.FIDONET.ORG