Results 1 to 7 of 7

Thread: [RESOLVED] Maximum Interval of Timer

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Posts
    688

    Resolved [RESOLVED] Maximum Interval of Timer

    Hi

    what is the maximum interval of timer . If i want that it should execute after 15 minutes , is it possible.

    Thanks

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Maximum Interval of Timer

    The maximum interval of the timer control is 60000 '60 seconds.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3
    Addicted Member masoudk1990's Avatar
    Join Date
    Nov 2013
    Location
    Persia
    Posts
    172

    Re: Maximum Interval of Timer

    Quote Originally Posted by Nightwalker83 View Post
    The maximum interval of the timer control is 60000 '60 seconds.
    So you can implement it with 15 timers.
    Every 60 second enable other timer and disable this timer.
    Computer Enterprise Masoud Keshavarz
    For more information contact masoudk1990@yahoo.com

  4. #4
    Addicted Member masoudk1990's Avatar
    Join Date
    Nov 2013
    Location
    Persia
    Posts
    172

    Re: Maximum Interval of Timer

    lol sorry you can implement it with one timer too.
    Declare a variable as a counter and increase it every 60 seconds, if variable get equal to 15 execute your command.
    Computer Enterprise Masoud Keshavarz
    For more information contact masoudk1990@yahoo.com

  5. #5
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    764

    Re: Maximum Interval of Timer

    Teach your Timer to count.
    Have it fire once a minute (or thereabouts; they're not the most accurate things in the World) and have it count how many times it has fired so far (i.e. increment a [Form level] variable). When it gets to fifteen (or whatever), have the Timer code call the method that does the real work.

    Regards, Phill W.

  6. #6
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Maximum Interval of Timer

    Quote Originally Posted by masoudk1990 View Post
    So you can implement it with 15 timers.
    Every 60 second enable other timer and disable this timer.
    That is a waste of resources.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  7. #7
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: [RESOLVED] Maximum Interval of Timer

    Another option is to set the start time and test the system clock for the difference between starttime and now within your timer. If you want it to be very accurate, within a second or so set the timer interval to one second and test the time in your timer tick event

    So you can implement it with 15 timers.
    Every 60 second enable other timer and disable this timer.
    That would be a horrible choice, definitely would not do this under any condition

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width