I am trying to program some real time alarm functions in my Leopard. I want to be able to
set an alarm via the touch screen and have some events happen when the time is reached. I also want to be able to monitor the count down or count up to that event via variable on the display.
My first observation was that timers could not be displayed on the screen. So I have to load the timer values to variables to display them. I got that one figured out.
I also want to be able to have an event happen in say 3hours 20 mins and 40secs. To do this
I setup 3 variables to store the alarm hours, minutes, and seconds. I start a timer that in turn starts three other variables counting the seconds , minutes and hour. When they are equal my event happens. I got this coded up but it is not tested yet.
Method 2:
Another way to do this would be to load the current hour minute and second into a variable and add the 3:20:40 to the current time and trigger the alarm at that calculated time.
The only problem is how do I get the present time loaded in three variables.
Here come the questions:
Anyone know how to do that?
Anyone want to comment on how else to program this?
Anyone know how to get the current time loaded
into a variable? This way I can use method 2.
I will post my code on the forum for all to use.
I am using Dave Alden's Ocelot complier to write my code in Version 2.10b1.
Thanks
Scott
set an alarm via the touch screen and have some events happen when the time is reached. I also want to be able to monitor the count down or count up to that event via variable on the display.
My first observation was that timers could not be displayed on the screen. So I have to load the timer values to variables to display them. I got that one figured out.
I also want to be able to have an event happen in say 3hours 20 mins and 40secs. To do this
I setup 3 variables to store the alarm hours, minutes, and seconds. I start a timer that in turn starts three other variables counting the seconds , minutes and hour. When they are equal my event happens. I got this coded up but it is not tested yet.
Method 2:
Another way to do this would be to load the current hour minute and second into a variable and add the 3:20:40 to the current time and trigger the alarm at that calculated time.
The only problem is how do I get the present time loaded in three variables.
Here come the questions:
Anyone know how to do that?
Anyone want to comment on how else to program this?
Anyone know how to get the current time loaded
into a variable? This way I can use method 2.
I will post my code on the forum for all to use.
I am using Dave Alden's Ocelot complier to write my code in Version 2.10b1.
Thanks
Scott
Comment