baylibre-acme: Use SR_HZ_TO_NS() when configuring the timerfd.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
7e5a048ff2
commit
7a1a3a36a9
|
@ -374,7 +374,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
tspec.it_interval.tv_sec = 0;
|
tspec.it_interval.tv_sec = 0;
|
||||||
tspec.it_interval.tv_nsec = (1000000000L / devc->samplerate);
|
tspec.it_interval.tv_nsec = SR_HZ_TO_NS(devc->samplerate);
|
||||||
tspec.it_value = tspec.it_interval;
|
tspec.it_value = tspec.it_interval;
|
||||||
|
|
||||||
if (timerfd_settime(devc->timer_fd, 0, &tspec, NULL)) {
|
if (timerfd_settime(devc->timer_fd, 0, &tspec, NULL)) {
|
||||||
|
|
Loading…
Reference in New Issue