private void DoCheckState() { DateTime startDate = DateTime.Now; SensorState state = sensor.DoCheckState(ParentServer); LastCheckDuration = DateTime.Now - startDate; LastState = ConvertSensorToServiceState(state); LastCheck = startDate; }