summaryrefslogtreecommitdiffstats
path: root/testsuites/samples/nsecs
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-11 19:45:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-11 19:45:50 +0000
commitdd61160701e176504fb62effca3def136a9ba67a (patch)
tree5632ea97288c3387598f6a1ceb1d8ac7c75ed43d /testsuites/samples/nsecs
parent2007-05-11 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-dd61160701e176504fb62effca3def136a9ba67a.tar.bz2
2007-05-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* base_sp/Makefile.am, hello/Makefile.am, iostream/Makefile.am, loopback/Makefile.am, nsecs/Makefile.am, pppd/Makefile.am, ticker/Makefile.am, ticker/system.h, unlimited/Makefile.am: Add optional managers to Makefiles. Clean up test cases so last output line follows END OF pattern. Make sure test case all run. All tests appeared ok on sis. * nsecs/init.c: Commit hack so test will compile when POSIX is disabled. Remove hack when clock_gettime() is present even when --disable-posix.
Diffstat (limited to 'testsuites/samples/nsecs')
-rw-r--r--testsuites/samples/nsecs/Makefile.am2
-rw-r--r--testsuites/samples/nsecs/init.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/testsuites/samples/nsecs/Makefile.am b/testsuites/samples/nsecs/Makefile.am
index 8e1404141e..bf9dd4ed7c 100644
--- a/testsuites/samples/nsecs/Makefile.am
+++ b/testsuites/samples/nsecs/Makefile.am
@@ -2,6 +2,8 @@
## $Id$
##
+MANAGERS = all
+
rtems_tests_PROGRAMS = nsecs.exe
nsecs_exe_SOURCES = init.c
diff --git a/testsuites/samples/nsecs/init.c b/testsuites/samples/nsecs/init.c
index f4f74203a3..32fc543761 100644
--- a/testsuites/samples/nsecs/init.c
+++ b/testsuites/samples/nsecs/init.c
@@ -69,21 +69,19 @@ 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 );
-#if 0
- printf( "%d:%d %d:%d ",
- start.tv_sec, start.tv_nsec,
- stop.tv_sec, stop.tv_nsec,
- );
-#else
printf( "Start: %s:%d\nStop : %s:%d",
my_ctime(start.tv_sec), start.tv_nsec,
my_ctime(stop.tv_sec), stop.tv_nsec
);
-#endif
printf( " --> %d:%d\n", diff.tv_sec, diff.tv_nsec );
}