Add clock_settime and clock_nanosleep.
Add the missing prototypes, fix the existing prototypes to use clockid_t rather than int, fix clock_nanosleep's failure behavior, and add simple tests. Bug: 17644443 Bug: https://code.google.com/p/android/issues/detail?id=77372 Change-Id: I03fba369939403918abcabae9551a7123953d780 Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
This commit is contained in:

committed by
Elliott Hughes

parent
c229705051
commit
1816025684
@@ -85,8 +85,10 @@ extern void tzset(void) __LIBC_ABI_PUBLIC__;
|
||||
|
||||
extern clock_t clock(void) __LIBC_ABI_PUBLIC__;
|
||||
|
||||
extern int clock_getres(int, struct timespec*) __LIBC_ABI_PUBLIC__;
|
||||
extern int clock_gettime(int, struct timespec*) __LIBC_ABI_PUBLIC__;
|
||||
extern int clock_getres(clockid_t, struct timespec*) __LIBC_ABI_PUBLIC__;
|
||||
extern int clock_gettime(clockid_t, struct timespec*) __LIBC_ABI_PUBLIC__;
|
||||
extern int clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) __LIBC_ABI_PUBLIC__;
|
||||
extern int clock_settime(clockid_t, const struct timespec*) __LIBC_ABI_PUBLIC__;
|
||||
|
||||
extern int timer_create(int, struct sigevent*, timer_t*) __LIBC_ABI_PUBLIC__;
|
||||
extern int timer_delete(timer_t) __LIBC_ABI_PUBLIC__;
|
||||
|
Reference in New Issue
Block a user