From 7761beeb56c857150052b0576e639375f4b1a55c Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 12 Oct 2011 02:19:03 +0200 Subject: [PATCH] ndk: 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 , 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 --- ndk/platforms/android-3/include/time.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ndk/platforms/android-3/include/time.h b/ndk/platforms/android-3/include/time.h index b5227d7c0..caf6aa7e4 100644 --- a/ndk/platforms/android-3/include/time.h +++ b/ndk/platforms/android-3/include/time.h @@ -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