[Tfug] A sense of time

jblais joe.blais at pti-instruments.com
Fri Aug 3 09:31:24 MST 2007



> -----Original Message-----
> From: tfug-bounces at tfug.org [mailto:tfug-bounces at tfug.org]On Behalf Of
> Bexley Hall
> Sent: Thursday, August 02, 2007 4:05 PM
> To: tfug at tfug.org
> Subject: [Tfug] A sense of time
>
>
> Hi,
>
> I've periodically posted this question (or variations
> thereof) in a number of different forums.  Obviously,
> never quite happy with the answer(s) I've received
> (I suspect it is yet another unsolvable problem  :< )
>
> The issue is tracking calendar time in a system
> that exposes it (in a variety of forms) to the user.
> And, where that user is capable of "changing" the
> "current time".


How about every time the user sets the time, you write a sync time --
battery time vs cpu ticks - to a file.
Whenever the machine boots, look at the battery saved time and adjust the
sync file/time.
You define your events in terms of cpu cycles & cpu cycle counter wraps (a
little ways beyond base 10 counting).
When it's 10:02:13.1234 and  10897132691287 cpu ticks, and an event is
defined for 12:00, it might equate to an alarm time of 1 wrap + 8723986
ticks.  So that's the effective alarm time.  If the user changes his display
clock so he won't be late, the problem becomes: did he mean to set the alarm
for lunch, or when the sun was high?  He might change his lunch schedule,
but can't affect the sun.

joe







More information about the tfug mailing list