Skip to content

Commit

Permalink
samples: zbus: add leading zeros while printing duration
Browse files Browse the repository at this point in the history
1.This change will print leading zeros after delimeter
  in the event of duration being less than 0.1ns
2.This change was tested on mimxrt1060_evk with
  :samples/subsys/zbus/benchmark sample

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
  • Loading branch information
jilaypandya committed Jul 6, 2023
1 parent f6eeb9d commit 3392ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/subsys/zbus/benchmark/src/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static void producer_thread(void)

LOG_INF("Bytes sent = %lld, received = %lu", BYTES_TO_BE_SENT, atomic_get(&count));
LOG_INF("Average data rate: %llu.%lluMB/s", i, f);
LOG_INF("Duration: %llu.%llus", duration / NSEC_PER_SEC, duration % NSEC_PER_SEC);
LOG_INF("Duration: %lld.%09llus", duration / NSEC_PER_SEC, duration % NSEC_PER_SEC);

printk("\n@%llu\n", duration);
}
Expand Down

0 comments on commit 3392ceb

Please sign in to comment.