private void printThread() { //while (true) while (runTele) { int temp = (int)teletest.CPU_temp(); int load = (int)teletest.CPU_load(); string uptime = teletest.UpTime(); bool hddBusy = teletest.hddActivity(); string[] reporte = new string[3]; if (temp < 10) { reporte[0] = String.Format("0" + temp.ToString()); } else { reporte[0] = temp.ToString(); } if (load < 10) { reporte[1] = String.Format("0" + load.ToString()); } else if (load > 99) { reporte[1] = "99"; } else { reporte[1] = load.ToString(); } reporte[2] = uptime; // running on worker thread this.Invoke((MethodInvoker) delegate { updateHDDState(hddBusy); updateLabels(reporte); // runs on UI thread }); //voice if (voiceActive) { if (temp >= 60) { Telemetry.voice.Speak("Core Temperature over sixty degrees", 2); } } Thread.Sleep(400); } }