summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-08-17 14:49:42 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-08-17 19:01:14 +0200
commitc91f6f5f4e236688ba8acb204fe85dc88adaaf0e (patch)
treefcbbbf70fac8c81bfc8ad6bc76dc391f45bc17ea /testsuites
parentrecord: Simplify client visit() (diff)
downloadrtems-c91f6f5f4e236688ba8acb204fe85dc88adaaf0e.tar.bz2
record: Pass bintime to client handlers
This is a minor optimization.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/record02/init.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/testsuites/libtests/record02/init.c b/testsuites/libtests/record02/init.c
index f1c93f7df8..5979b5b445 100644
--- a/testsuites/libtests/record02/init.c
+++ b/testsuites/libtests/record02/init.c
@@ -46,8 +46,7 @@ typedef struct {
static test_context test_instance;
static rtems_record_client_status client_handler(
- uint32_t seconds,
- uint32_t nanoseconds,
+ uint64_t bt,
uint32_t cpu,
rtems_record_event event,
uint64_t data,
@@ -56,7 +55,16 @@ static rtems_record_client_status client_handler(
{
(void) arg;
- if ( seconds != 0 && nanoseconds != 0 ) {
+ if ( bt != 0 ) {
+ uint32_t seconds;
+ uint32_t nanoseconds;
+
+ rtems_record_client_bintime_to_seconds_and_nanoseconds(
+ bt,
+ &seconds,
+ &nanoseconds
+ );
+
printf( "%" PRIu32 ".%09" PRIu32 ":", seconds, nanoseconds );
} else {
printf( "*:" );