From 98c01fe1277e5a386377347635a8a7fee8abc534 Mon Sep 17 00:00:00 2001 From: Daniel Elstner Date: Tue, 22 Sep 2015 06:54:33 +0200 Subject: [PATCH] demo: Increase timer interval to 100 ms Timer intervals shorter than about 100 ms are unnecessarily taxing on system resources. Also, on systems like Windows the smallest resolvable time unit without using high precision timers is about 15 ms. Regular timer intervals should be well above that value to avoid being dominated by noise and round-off. --- src/hardware/demo/demo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c index ce824918..6a1a2b2a 100644 --- a/src/hardware/demo/demo.c +++ b/src/hardware/demo/demo.c @@ -865,7 +865,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) while (g_hash_table_iter_next(&iter, NULL, &value)) generate_analog_pattern(value, devc->cur_samplerate); - sr_session_source_add(sdi->session, -1, 0, 40, prepare_data, (void *)sdi); + sr_session_source_add(sdi->session, -1, 0, 100, + prepare_data, (struct sr_dev_inst *)sdi); /* Send header packet to the session bus. */ std_session_send_df_header(sdi, LOG_PREFIX);