ndk: <time.h> Add missing clock_settime()/clock_nanosleep() declarations

Both functions are part of the C library since Android 1.5 / API level 3
but were missing a declaration in <time.h>, so add then here

+ Fix first parameter from 'int' to 'clockid_t' for clock_getres()
  and clock_gettime()

Fixes http://code.google.com/p/android/issues/detail?id=20140

Change-Id: Ic2191d5eb54475c149b9a6b8f3ba55bc8ed4643f
This commit is contained in:
David 'Digit' Turner
2011-10-12 02:19:03 +02:00
parent b298c3bdc9
commit 7761beeb56

View File

@@ -96,8 +96,10 @@ extern long int timezone;
extern clock_t clock(void);
/* BIONIC: extra linux clock goodies */
extern int clock_getres(int, struct timespec *);
extern int clock_gettime(int, struct timespec *);
extern int clock_getres(clockid_t, struct timespec *);
extern int clock_gettime(clockid_t, struct timespec *);
extern int clock_settime(clockid_t, const struct timespec *);
extern int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *);
#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 1