Announcement

Collapse
No announcement yet.

Time display across midnight

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

  • Time display across midnight

    I have a program that displays the current time and date. The time updates until 11:59 pm. I have added the following code but it still does not roll over.

    {initialization}
    ON TIMER(60) GOSUB UpdateTimeDisplay
    TIMER ON
    {Program loop}
    :UpdateTimeDisplay
    IF TIMER < 120 THEN CALL DisplayHeaderDateTime()
    RETURN

    The date and time do update on a key press.

    TIA

  • #2
    PowerBASIC checks the timer "in between" each line of code. So if your program is waiting for input, for example in an INPUT$ or LINE INPUT$ statement, the timer will not fire. Is that what's going on? Without seeing more code it's hard to guess...

    Did you add that ON TIMER code to "patch" a problem in your regular time-display routines? If so, post that instead of the ON TIMER code, and we may be able to help you fix the original problem.

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited March 21, 2000).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      Somebody here did find the problem in another routine written here. Problem solved.

      Thanks Eric

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

      Comment

      Working...
      X