private static void ScreenHeader() { Console.Clear(); Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("Raspberry Pi Temperature Monitor Hit any key to stop"); Console.WriteLine("Started : " + _startingDateTime.ToString() + " || " + DateTime.Now.ToString()); Console.WriteLine("1m\t 5m\t 15m CPU Load Averages"); Console.WriteLine(FormatHelper.FormatProcessAverages(Monitoring.GetProcessAverage())); Console.ResetColor(); for (int i = 0; i < Console.BufferWidth; i++) { Console.Write('='); } }
static void Main(string[] args) { _startingDateTime = DateTime.Now; ScreenOutput(); while (true) { var temperature = Monitoring.GetTemperature(); ScreenOutput(Monitoring.TemperatureOutput(temperature)); ScreenOutput(Monitoring.TemperatureBarOutput(), true); //ScreenOutput(Monitoring.GetOpenPorts(), true); ScreenOutput("Throttling: " + FormatHelper.FormatThrottledState(Monitoring.GetThrottledState()), true); if (Console.KeyAvailable) { break; } Thread.Sleep(900); } }