nerdDoro; date/time math calculations?
Jeffa
Posts: 80
One function I am attempting to add to nerdDoro before the fast approaching deadline is a timer to implement a pomodoro. A pomodoro is 25 minutes of time focused on a specific task.
See http://www.pomodorotechnique.com/ for information. I sometimes use it to disipline myself, I hide my email and twitter windows and elminate other distractions to focus on a specific task.
I'm wondering if anyone has any .spin examples of datetime maipulation. I think the more elagent approach would be to take the current tod from the rtc and add 25 minutes and set one of the rtc alarms then check that alarm in my main program loop. Probably wouldn't need an extra cog this way. I've read about how to set the alarm on the rtc, but the datetime addtion of current time plus 25 minutes may be a lot to accomplish in the time I have available.
Alternatley perhaps use a timer object such as this one from the obex: http://obex.parallax.com/objects/45/ This one would probably be easier for me to implement, but the alarm method just seems like the 'right' way to go.
A unix or posix http://en.wikipedia.org/wiki/Unix_time timestamp could be handy. Grab the current timestamp and add 25 minutes. I can accomplish something like this with the previously mentioned object.
Any thoughts, suggestions are welcome. Perhaps someone knows of an object I missed that might have some utility for me in this phase of my Spinneret project nerdDoro.
See http://www.pomodorotechnique.com/ for information. I sometimes use it to disipline myself, I hide my email and twitter windows and elminate other distractions to focus on a specific task.
I'm wondering if anyone has any .spin examples of datetime maipulation. I think the more elagent approach would be to take the current tod from the rtc and add 25 minutes and set one of the rtc alarms then check that alarm in my main program loop. Probably wouldn't need an extra cog this way. I've read about how to set the alarm on the rtc, but the datetime addtion of current time plus 25 minutes may be a lot to accomplish in the time I have available.
Alternatley perhaps use a timer object such as this one from the obex: http://obex.parallax.com/objects/45/ This one would probably be easier for me to implement, but the alarm method just seems like the 'right' way to go.
A unix or posix http://en.wikipedia.org/wiki/Unix_time timestamp could be handy. Grab the current timestamp and add 25 minutes. I can accomplish something like this with the previously mentioned object.
Any thoughts, suggestions are welcome. Perhaps someone knows of an object I missed that might have some utility for me in this phase of my Spinneret project nerdDoro.
Comments