using System;
using System.Threading;

namespace HardwareAgent
{
    class Program
    {
        static void Main()
        {
            Console.WriteLine("Hardware Monitoring Agent Started");

            while (true)
            {
                try
                {
                    var payload = HardwareReader.CollectAll();
                    ApiClient.Send(payload);
                }
                catch (Exception ex)
                {
                    Console.WriteLine("ERROR: " + ex.Message);
                }

                Thread.Sleep(60000); // 60 detik
            }
        }
    }
}
