]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/demo/demo.c
Improve readability and clarity of some numbers.
[libsigrok.git] / src / hardware / demo / demo.c
index 63afcd106a67e54bd8a396c7224a0f5c8cd9ff52..7111097bb7657046d70c4f1efcf03e4cf39092cf 100644 (file)
@@ -757,7 +757,7 @@ static int prepare_data(int fd, int revents, void *cb_data)
        /* How many samples should we have sent by now? */
        time = g_get_monotonic_time();
        elapsed = time - devc->starttime;
-       expected_samplenum = elapsed * devc->cur_samplerate / 1000000;
+       expected_samplenum = elapsed * devc->cur_samplerate / (1000 * 1000);
 
        /* But never more than the limit, if there is one. */
        if (!devc->continuous)