[Tfug] A sense of time

Bexley Hall bexley401 at yahoo.com
Mon Aug 6 17:26:07 MST 2007


--- jblais <joe.blais at pti-instruments.com> wrote:

> > 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

Yes, i.e. you use "delay()" functions when you
want to deal with "relative time" -- e.g., turn
the motor on, wait for 3 seconds, then turn it off
(where seconds have the dimension of "time" but not
"absolute time")

But, it still doesn't get around those cases where you
*have* to "make a statement" about the "current time"
(or, some *other* time) and then convey those to the
user in *his* sense of "the current time".

> 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
> 
> 
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
> 



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/




More information about the tfug mailing list