Results 1 to 6 of 6

Thread: Separate Task or Time Calculation - Code Suggestion

Threaded View

  1. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Separate Task or Time Calculation - Code Suggestion

    I wouldn't use a loop and Thread.Sleep at all. I would use a Timers.Timer, which raises its Elapsed event on a secondary thread by default. Given that there are only two tasks and their differing schedule, I would use two Timers. If there was only one schedule or a large number of tasks then I'd probably go for a single Timer and, in the latter case, use some logic to determine which task(s) to perform.

    By the way, it is "pseudo", not "sudo".
    Last edited by jmcilhinney; Oct 15th, 2018 at 09:50 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

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