* [PATCH] shared/mainloop: Fix msec to nsec conversion in timerfd config
@ 2016-11-27 18:51 Loic Poulain
2016-11-28 12:35 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2016-11-27 18:51 UTC (permalink / raw)
To: luiz.von.dentz; +Cc: linux-bluetooth, Loic Poulain
---
src/shared/mainloop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/mainloop.c b/src/shared/mainloop.c
index 9fff615..eacb6a4 100644
--- a/src/shared/mainloop.c
+++ b/src/shared/mainloop.c
@@ -311,7 +311,7 @@ static inline int timeout_set(int fd, unsigned int msec)
itimer.it_interval.tv_sec = 0;
itimer.it_interval.tv_nsec = 0;
itimer.it_value.tv_sec = sec;
- itimer.it_value.tv_nsec = (msec - (sec * 1000)) * 1000;
+ itimer.it_value.tv_nsec = (msec - (sec * 1000)) * 1000 * 1000;
return timerfd_settime(fd, 0, &itimer, NULL);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] shared/mainloop: Fix msec to nsec conversion in timerfd config
2016-11-27 18:51 [PATCH] shared/mainloop: Fix msec to nsec conversion in timerfd config Loic Poulain
@ 2016-11-28 12:35 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2016-11-28 12:35 UTC (permalink / raw)
To: Loic Poulain; +Cc: Luiz Augusto Von Dentz, linux-bluetooth@vger.kernel.org
Hi Loic,
On Sun, Nov 27, 2016 at 8:51 PM, Loic Poulain <loic.poulain@gmail.com> wrote:
> ---
> src/shared/mainloop.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/shared/mainloop.c b/src/shared/mainloop.c
> index 9fff615..eacb6a4 100644
> --- a/src/shared/mainloop.c
> +++ b/src/shared/mainloop.c
> @@ -311,7 +311,7 @@ static inline int timeout_set(int fd, unsigned int msec)
> itimer.it_interval.tv_sec = 0;
> itimer.it_interval.tv_nsec = 0;
> itimer.it_value.tv_sec = sec;
> - itimer.it_value.tv_nsec = (msec - (sec * 1000)) * 1000;
> + itimer.it_value.tv_nsec = (msec - (sec * 1000)) * 1000 * 1000;
>
> return timerfd_settime(fd, 0, &itimer, NULL);
> }
> --
> 1.9.1
Applied, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-28 12:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-27 18:51 [PATCH] shared/mainloop: Fix msec to nsec conversion in timerfd config Loic Poulain
2016-11-28 12:35 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).