private void Run() { _serialPortConnector = new SerialPortConnector(_parser.ComPort); _serialPortConnector.TurnOff(); var endTime = DateTime.Now.AddMinutes(_parser.RunTimeMinutes); while (DateTime.Now.Ticks < endTime.Ticks) DoRun(); _serialPortConnector.TurnOff(); }
private void Run() { _serialPortConnector = new SerialPortConnector(_parser.ComPort); _serialPortConnector.TurnOff(); var endTime = DateTime.Now.AddMinutes(_parser.RunTimeMinutes); while (DateTime.Now.Ticks < endTime.Ticks) { DoRun(); } _serialPortConnector.TurnOff(); }