forked from Imagelibrary/rtems
2011-01-31 Ralf Corsépius <ralf.corsepius@rtems.org>
* POSIX/clock_gettime.c, POSIX/gettimeofday.c: New. * Makefile.am: Add clock_gettime, gettimeofday.c.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2011-01-31 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* POSIX/clock_gettime.c, POSIX/gettimeofday.c: New.
|
||||
* Makefile.am: Add clock_gettime, gettimeofday.c.
|
||||
|
||||
2011-01-28 Bharath Suri <bharath.s.jois@gmail.com>
|
||||
|
||||
PR 1661/testing
|
||||
|
||||
17
testsuites/libtests/POSIX/clock_gettime.c
Normal file
17
testsuites/libtests/POSIX/clock_gettime.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2011 by
|
||||
* Ralf Corsépius, Ulm, Germany. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software
|
||||
* is freely granted, provided that this notice is preserved.
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
struct timespec mytime;
|
||||
|
||||
return clock_gettime(CLOCK_REALTIME,&mytime);
|
||||
}
|
||||
18
testsuites/libtests/POSIX/gettimeofday.c
Normal file
18
testsuites/libtests/POSIX/gettimeofday.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2011 by
|
||||
* Ralf Corsépius, Ulm, Germany. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software
|
||||
* is freely granted, provided that this notice is preserved.
|
||||
*/
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
|
||||
return gettimeofday(&tv, &tz);
|
||||
}
|
||||
Reference in New Issue
Block a user