[Tfug] A sense of time
jblais
joe.blais at pti-instruments.com
Thu Aug 2 17:25:08 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".
>
> The problem creeps in when time is changed by the
> user -- either *correctly* or *incorrectly*.
For dealing with file times, it may be really rough.
For recurring things, perhaps look at the system ticker which starts when
the machine is powered up - just ticks, no real notion of human time. This
number wraps, but also resets at unknown times though. Ignoring the reset,
you could for instance compare the counter with the display clock at the
time a request is made, with the requested clock event time, then calculate
the count (and count wraps of the counter) to test when the event is to
start. If you periodically write a time/count synchronizer to some file,
then perhaps you can recover after a reset (winders is forever writing
registry junk to the hard drive, so it must be a good thing to do:-). My
guess is, a file with flags of what's been started and done my be helpful
anyway. A reset could throw everything out the window and require the event
to happen anyway. This "sync" file could be used to sync up file times as
well.
eh?
joe
More information about the tfug
mailing list