diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-25 15:10:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-26 11:55:47 +0200 |
commit | 88c74ab115b5135d4d93050596905d6ee573dd1e (patch) | |
tree | 395b852dd384040e20a6f178e913dddccac436bf /testsuites/samples/nsecs | |
parent | score: Create object implementation header (diff) | |
download | rtems-88c74ab115b5135d4d93050596905d6ee573dd1e.tar.bz2 |
score: Merge tod implementation into one file
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().
Diffstat (limited to 'testsuites/samples/nsecs')
-rw-r--r-- | testsuites/samples/nsecs/init.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/testsuites/samples/nsecs/init.c b/testsuites/samples/nsecs/init.c index f94c672d0c..fe5390dc38 100644 --- a/testsuites/samples/nsecs/init.c +++ b/testsuites/samples/nsecs/init.c @@ -23,6 +23,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include <time.h> #include <sys/time.h> #define CONFIGURE_INIT @@ -81,13 +82,9 @@ rtems_task Init( for (index=0 ; index <10 ; index++ ) { struct timespec start, stop; struct timespec diff; -#if 0 + clock_gettime( CLOCK_REALTIME, &start ); clock_gettime( CLOCK_REALTIME, &stop ); -#else - _TOD_Get( &start ); - _TOD_Get( &stop ); -#endif subtract_em( &start, &stop, &diff ); printf( "Start: %s:%ld\nStop : %s:%ld", |