Loading sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -921,9 +921,15 @@ TEST_P(SensorsAidlTest, NoStaleEvents) { continue; } // Skip sensors with no events const std::vector<Event> events = callback.getEvents(sensor.sensorHandle); if (events.empty()) { continue; } // Ensure that the first event received is not stale by ensuring that its timestamp is // sufficiently different from the previous event const Event newEvent = callback.getEvents(sensor.sensorHandle).front(); const Event newEvent = events.front(); std::chrono::milliseconds delta = duration_cast<std::chrono::milliseconds>(std::chrono::nanoseconds( newEvent.timestamp - lastEventTimestampMap[sensor.sensorHandle])); Loading sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h +7 −1 Original line number Diff line number Diff line Loading @@ -806,9 +806,15 @@ TEST_P(SensorsHidlTest, NoStaleEvents) { continue; } // Skip sensors with no events const std::vector<EventType> events = callback.getEvents(sensor.sensorHandle); if (events.empty()) { continue; } // Ensure that the first event received is not stale by ensuring that its timestamp is // sufficiently different from the previous event const EventType newEvent = callback.getEvents(sensor.sensorHandle).front(); const EventType newEvent = events.front(); milliseconds delta = duration_cast<milliseconds>( nanoseconds(newEvent.timestamp - lastEventTimestampMap[sensor.sensorHandle])); milliseconds sensorMinDelay = duration_cast<milliseconds>(microseconds(sensor.minDelay)); Loading Loading
sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -921,9 +921,15 @@ TEST_P(SensorsAidlTest, NoStaleEvents) { continue; } // Skip sensors with no events const std::vector<Event> events = callback.getEvents(sensor.sensorHandle); if (events.empty()) { continue; } // Ensure that the first event received is not stale by ensuring that its timestamp is // sufficiently different from the previous event const Event newEvent = callback.getEvents(sensor.sensorHandle).front(); const Event newEvent = events.front(); std::chrono::milliseconds delta = duration_cast<std::chrono::milliseconds>(std::chrono::nanoseconds( newEvent.timestamp - lastEventTimestampMap[sensor.sensorHandle])); Loading
sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h +7 −1 Original line number Diff line number Diff line Loading @@ -806,9 +806,15 @@ TEST_P(SensorsHidlTest, NoStaleEvents) { continue; } // Skip sensors with no events const std::vector<EventType> events = callback.getEvents(sensor.sensorHandle); if (events.empty()) { continue; } // Ensure that the first event received is not stale by ensuring that its timestamp is // sufficiently different from the previous event const EventType newEvent = callback.getEvents(sensor.sensorHandle).front(); const EventType newEvent = events.front(); milliseconds delta = duration_cast<milliseconds>( nanoseconds(newEvent.timestamp - lastEventTimestampMap[sensor.sensorHandle])); milliseconds sensorMinDelay = duration_cast<milliseconds>(microseconds(sensor.minDelay)); Loading