summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2022-11-23 19:45:15 +0100
committerJaroslav Kysela <perex@perex.cz>2022-11-23 19:45:15 +0100
commit536c93928bc57d941a7cd146dbcbd62df0be2d83 (patch)
tree4066f1f07245aa038c666661a0034b98ceabf555
parentf0f054517c05ff4ef7a1615851a686a3a202b9ff (diff)
downloadalsa-lib-536c93928bc57d941a7cd146dbcbd62df0be2d83.tar.gz
test: latency - usleep should not be used in the block mode
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--test/latency.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/latency.c b/test/latency.c
index 161d1f68..1b4848d6 100644
--- a/test/latency.c
+++ b/test/latency.c
@@ -678,7 +678,7 @@ int main(int argc, char *argv[])
loop_limit, latency_min * 2, latency_max * 2);
if (sys_latency > 0)
printf(", I/O updates %ims", sys_latency);
- else if (!block)
+ else if (!block && !use_poll)
printf(", I/O usleep %ius", usleep_val);
printf("\n");
@@ -764,7 +764,7 @@ int main(int argc, char *argv[])
} else if (use_poll) {
/* use poll to wait for next event */
snd_pcm_wait(chandle, 1000);
- } else if (usleep_val > 0) {
+ } else if (!block && usleep_val > 0) {
usleep(usleep_val);
}
if (pos_dump || realtime_check) {