Timer problem

  • Thread starter Thread starter zurg
  • Start date Start date
Z

zurg

As far as I remember somewhere here was posted a question about Timer that
was stoping at midnight(0.00 a.m.). I'm going to face this problem tommorow
(implemeting a long working timer) so if anyone remember the solvation I
would be very greatful...
 
I wasn't around for that discussion and I've never used a timer. before--but
I think I might have a viable solution to offer.

Can you create some kind of loop and every time the timer stops, increase an
index (that would represent days) and restart the timer?
 
Hi,

The Timer function returns the number of seconds since midnight. Thus, it
rolls over from 86399 to 0 at midnight. Any calculation based on the Timer
function needs to take this rollover into account (check to see if the
rollover happened). There are a couple of standard techniques.

However... The Timer control uses completely different underlying Windows
functions, and isn't affected.

Which are you interested in using?

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
* "zurg said:
As far as I remember somewhere here was posted a question about Timer that
was stoping at midnight(0.00 a.m.). I'm going to face this problem tommorow
(implemeting a long working timer) so if anyone remember the solvation I
would be very greatful...

Are you referring to 'Microsoft.VisualBasic.DateAndTime.Timer'?
 
Back
Top