thevoncarstein
thevoncarstein
CC#
Created by thevoncarstein on 12/18/2023 in #help
Git does not show changes
Wow, good catch! Thank you a lot!
3 replies
CC#
Created by Ely on 2/9/2023 in #help
❔ How do I look a bool method every 5 minutes?
1. You could use Timer class:
var _timer = new System.Timers.Timer(300000); // 5 minutes in milliseconds
_timer.Elapsed += new ElapsedEventHandler(WindowWatch);
_timer.Enabled = true;
var _timer = new System.Timers.Timer(300000); // 5 minutes in milliseconds
_timer.Elapsed += new ElapsedEventHandler(WindowWatch);
_timer.Enabled = true;
And set _timer.Enabled = false to stop. 2. Set WindowWatch to void. If you want to return something, make an Action<bool> callback instead.
4 replies