|
-
Oct 15th, 2018, 09:45 PM
#2
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.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|