aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Anisov <andrii_anisov@epam.com>2017-09-05 13:22:29 -0400
committerBjörn Brandenburg <bbb@mpi-sws.org>2017-09-08 12:03:42 -0400
commit31352298446e1fc1ba4dc391197aef3fd57bf080 (patch)
treed11e71b05c0afec8d4d97d15cd4633486e70c806
parent7abb94df06f7796b5125280bb3ad866891113ad5 (diff)
Unify time measurement instruments
In order to get more trustworth delay loop debug values, use the same cputime() function to measure elapsed time as the rest of functions do. Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
-rw-r--r--bin/rtspin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/rtspin.c b/bin/rtspin.c
index 8a92a0d..04e453b 100644
--- a/bin/rtspin.c
+++ b/bin/rtspin.c
@@ -253,9 +253,9 @@ static void debug_delay_loop(void)
253 253
254 while (1) { 254 while (1) {
255 for (delay = 0.5; delay > 0.01; delay -= 0.01) { 255 for (delay = 0.5; delay > 0.01; delay -= 0.01) {
256 start = wctime(); 256 start = cputime();
257 loop_for(delay, 0); 257 loop_for(delay, 0);
258 end = wctime(); 258 end = cputime();
259 printf("%6.4fs: looped for %10.8fs, delta=%11.8fs, error=%7.4f%%\n", 259 printf("%6.4fs: looped for %10.8fs, delta=%11.8fs, error=%7.4f%%\n",
260 delay, 260 delay,
261 end - start, 261 end - start,