diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-17 14:49:42 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-17 19:01:14 +0200 |
commit | c91f6f5f4e236688ba8acb204fe85dc88adaaf0e (patch) | |
tree | fcbbbf70fac8c81bfc8ad6bc76dc391f45bc17ea /testsuites/libtests | |
parent | record: Simplify client visit() (diff) | |
download | rtems-c91f6f5f4e236688ba8acb204fe85dc88adaaf0e.tar.bz2 |
record: Pass bintime to client handlers
This is a minor optimization.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r-- | testsuites/libtests/record02/init.c | 14 |
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( "*:" ); |