Results 1 to 4 of 4

Thread: [RESOLVED] run code every specified time

  1. #1

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Resolved [RESOLVED] run code every specified time

    hi guys! i have a program that check the current time and compare it to time specified by the user but i want to perform the checking every once in a while for example every 5 minutes..can anybody please tell me on how to do this. Thanks in advance!

  2. #2

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: run code every specified time

    I got it i have to use Timer right? or is there anny better way?

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: run code every specified time

    Quote Originally Posted by daimous
    I got it i have to use Timer right? or is there anny better way?
    A timer is a good idea.
    Another good idea is to calculate the time difference between DateTime.Now and the specified time and set the Interval according to the result
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  4. #4

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: run code every specified time

    ok Thanks!

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