Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class App
- {
- public bool IsRunning {get; set;}
- private Thread houseKeepingThread;
- public void Start()
- {
- this.IsRunning = true;
- this.houseKeepingThread = new Thread(ThreadFunc);
- this.houseKeepingThread.Start();
- }
- private void ThreadFunc()
- {
- while (this.IsRunning)
- {
- DoWork();
- // wait for 30 seconds
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement