public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] client/player: Fix not calculating time to wait
@ 2022-12-09 18:03 Luiz Augusto von Dentz
  2022-12-09 19:12 ` [BlueZ] " bluez.test.bot
  2022-12-09 21:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-12-09 18:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

The difference of time start and current time may have advanced just
enough to add a second leaving start nanoseconds to be bigger.
---
 client/player.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/client/player.c b/client/player.c
index 7f2b26b8791a..95309e101148 100644
--- a/client/player.c
+++ b/client/player.c
@@ -3396,6 +3396,10 @@ static void send_wait(struct timespec *t_start, uint32_t us)
 	}
 
 	t_diff.tv_sec = t_now.tv_sec - t_start->tv_sec;
+	if (t_start->tv_nsec > t_now.tv_nsec) {
+		t_diff.tv_sec--;
+		t_now.tv_nsec += 1000000000L;
+	}
 	t_diff.tv_nsec = t_now.tv_nsec - t_start->tv_nsec;
 
 	delta_us = us - TS_USEC(&t_diff);
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ] client/player: Fix not calculating time to wait
  2022-12-09 18:03 [PATCH BlueZ] client/player: Fix not calculating time to wait Luiz Augusto von Dentz
@ 2022-12-09 19:12 ` bluez.test.bot
  2022-12-09 21:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-12-09 19:12 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=703472

---Test result---

Test Summary:
CheckPatch                    PASS      0.50 seconds
GitLint                       PASS      0.33 seconds
BuildEll                      PASS      27.75 seconds
BluezMake                     PASS      902.16 seconds
MakeCheck                     PASS      11.54 seconds
MakeDistcheck                 PASS      152.81 seconds
CheckValgrind                 PASS      250.55 seconds
bluezmakeextell               PASS      96.53 seconds
IncrementalBuild              PASS      733.12 seconds
ScanBuild                     PASS      1040.94 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ] client/player: Fix not calculating time to wait
  2022-12-09 18:03 [PATCH BlueZ] client/player: Fix not calculating time to wait Luiz Augusto von Dentz
  2022-12-09 19:12 ` [BlueZ] " bluez.test.bot
@ 2022-12-09 21:30 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-12-09 21:30 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri,  9 Dec 2022 10:03:12 -0800 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> The difference of time start and current time may have advanced just
> enough to add a second leaving start nanoseconds to be bigger.
> ---
>  client/player.c | 4 ++++
>  1 file changed, 4 insertions(+)

Here is the summary with links:
  - [BlueZ] client/player: Fix not calculating time to wait
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e07c1e723ee7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-09 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-09 18:03 [PATCH BlueZ] client/player: Fix not calculating time to wait Luiz Augusto von Dentz
2022-12-09 19:12 ` [BlueZ] " bluez.test.bot
2022-12-09 21:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox