Decided to not use any timers.
What i did is simpler.
Added a backgroundworker.
Added a Shown event the Shown event fire after all the constructor have been loaded.
In the Shown event im starting the backgroundworker async.
In the backgroundworker DoWork im doing:
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
while(true)
{
cpuView();
gpuView();
Thread.Sleep(1000);
}
}
In this case it’s better to use two
System.Threading.Timerand execute your cpu-intensive operations in these two threads. Please note that you must access controls withBeginInvoke. You can encapsulate those accesses into properties setter or even better pull them out to a view model class.