goto exit;
}
- period = (int64_t) (1000000000LL / sensor[s].sampling_rate);
+ period = (int64_t) (1000000000.0 / sensor[s].sampling_rate);
timestamp += period;
set_timestamp(&target_time, timestamp);
if (sensor[s].report_ts && sensor[s].sampling_rate &&
REPORTING_MODE(sensor_desc[s].flags) == SENSOR_FLAG_CONTINUOUS_MODE)
{
- period = (int64_t) (1000000000LL / sensor[s].sampling_rate);
+ period = (int64_t) (1000000000.0 / sensor[s].sampling_rate);
maxTs = sensor[s].report_ts + THRESHOLD * period;
/* If we're too far behind get back on track */
if (ts - maxTs >= MAX_DELAY)
if (!sensor[s].sampling_rate)
continue;
- period = (int64_t) (1000000000.0/ sensor[s].sampling_rate);
+ period = (int64_t) (1000000000.0 / sensor[s].sampling_rate);
current_ts = get_timestamp_boot();
target_ts = sensor[s].report_ts + period;
return -EINVAL;
}
- requested_sampling_rate = 1000000000.0/ns;
+ requested_sampling_rate = 1000000000.0 / ns;
ALOGV("Entering set delay S%d (%s): current rate: %f, requested: %f\n",
s, sensor[s].friendly_name, sensor[s].sampling_rate,
if (enabled && sensor_get_quirks(handle) & QUIRK_INITIAL_RATE) {
ALOGI("Forcing initial sampling rate\n");
sensor_activate(handle, 1, 0);
- sensor_set_delay(handle, 100000000L); /* Start with 100 ms */
+ sensor_set_delay(handle, 100000000); /* Start with 100 ms */
sensor_activate(handle, 0, 0);
/* Clear flag for this sensor as do this only once */