diff options
Diffstat (limited to 'sensors/common/default/2.X/Sensor.cpp')
-rw-r--r-- | sensors/common/default/2.X/Sensor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sensors/common/default/2.X/Sensor.cpp b/sensors/common/default/2.X/Sensor.cpp index 23c98032d1..fd701fd399 100644 --- a/sensors/common/default/2.X/Sensor.cpp +++ b/sensors/common/default/2.X/Sensor.cpp @@ -59,10 +59,10 @@ const SensorInfo& Sensor::getSensorInfo() const { } void Sensor::batch(int64_t samplingPeriodNs) { - if (samplingPeriodNs < mSensorInfo.minDelay * 1000ll) { - samplingPeriodNs = mSensorInfo.minDelay * 1000ll; - } else if (samplingPeriodNs > mSensorInfo.maxDelay * 1000ll) { - samplingPeriodNs = mSensorInfo.maxDelay * 1000ll; + if (samplingPeriodNs < mSensorInfo.minDelay * 1000LL) { + samplingPeriodNs = mSensorInfo.minDelay * 1000LL; + } else if (samplingPeriodNs > mSensorInfo.maxDelay * 1000LL) { + samplingPeriodNs = mSensorInfo.maxDelay * 1000LL; } if (mSamplingPeriodNs != samplingPeriodNs) { |