Announcement

Collapse
No announcement yet.

slow system clock

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • slow system clock

    I was wondering if there is a known problem/ fix for a system
    real time clock that appears to slow down when running power basic
    and or applications created with power basic. I have for quite a
    while noticed that my dx2-66 laptop loses time while running power
    basic but just assumed that it was the laptop reaching it use by
    date.
    A couple of days ago I was contacted by a customer with a query
    about his clock that also lost time consistently. As the other
    computer (pentium) runs only the power basic application I created
    I began to suspect that my application or power basic was causing
    the clock to slow.
    My program uses time$ 3 times a second to update an onscreen clock.
    Any ideas anyone.

    ------------------

  • #2
    Alan, I have to ask -- is this a serious question?

    The clock is actually maintained by the hardware, so if it is diverging from real time, then the problem is the accuracy of the system hardware clock.

    If the PC gets switched off regularly (and left off for medium/long periods), then the backup battery which maintains the clock when the power is off is most probably getting flat -- this can have a serious effect on the accuracy of the clock.

    BTW, if you put any two PC's together and sync their times then leave them alone, they will eventually drift form each other due to tolerences in the clock circuitry components (hardware). PC's with network or Internet access often use an app that regularly resync's the PC's internal clock with a specific machine or an atomic clock.

    In summary, unless your app (or some other app on the system) is occasionally setting/adjusting the system time, any variance of your clock from real time cannot be put down to PowerBASIC.

    Sorry!

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      My program uses time$ 3 times a second to update an onscreen clock.
      Any ideas anyone.
      Yeah. Update MAXIMUM once per second. Not that the time calculation all that long, but formatting it and printing it takes a lot of time away from other things, like what the program is actually supposed to be doing.

      (Also: name for me any user who cares a whit about the decimal seconds).

      MCM
      Michael Mattias
      Tal Systems Inc. (retired)
      Racine WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        I will check further but the pentium pc was on continously for
        4 days and over that time lost 12 minutes.
        I can't say I really expect the problem to be power basic its
        just that is about the only thing the 2 pcs have in common.
        I will post test results here later.

        ------------------

        Comment


        • #5
          My previous computer had the same problem. No big deal, I just reset the time every couple of days. Must have been a "chip" thing...

          MCM
          Michael Mattias
          Tal Systems Inc. (retired)
          Racine WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            In my experience, "budget" or "low end" motherboards tend to exhibit poor system clock accuracy over long periods... several minutes loss/gain per day is not uncommon. The problem is not limited to those MB's though - "top of the range" boards sometimes do the same thing.

            Over the years I've seen both time loss and gain on systems, time loss seems to be a much more common occurance than time gain.


            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment


            • #7
              There used to be a known issue with some BIOSs when reading the system clock.
              Basically, when the clock was accessed using TIME$, it didn't get updated while the instruction was executing.
              So if, for example there was a ON TIMER .... PRINT TIME$ or similar instruction sequence the clock would become progressively slower.
              There used to be numerous fixes for this, from the simple to the sophisticated.
              I was under the impression it had been fixed on most boards some time ago, as I was last troubled by it about 1994.

              ------------------


              [This message has been edited by David J Walker (edited February 16, 2002).]

              Comment


              • #8
                Alan,
                Use time$ 3 times a second means 10800 times per hour.
                12 minutes slower in 4 days means 3 minutes a day or 7.5 seconds per hour.

                Use a counter and add 1 to a counter every time when you "use" the time$
                then adjust the clock every 2 hours to increase 15 seconds (or whatever time)

                'after "use" the time$
                INCR COUNTER:IF COUNTER=21600 THEN COUNTER=0
                (WRITE A ROUTINE TO INCREASE TIME$ BY 15 SECONDS, THINK YOU CAN DO IT)


                Regards

                ------------------


                [This message has been edited by John Lee (edited February 16, 2002).]

                Comment

                Working...
                X