equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
176 static void clock_init(void); |
176 static void clock_init(void); |
177 |
177 |
178 // fast POSIX clocks support |
178 // fast POSIX clocks support |
179 static void fast_thread_clock_init(void); |
179 static void fast_thread_clock_init(void); |
180 |
180 |
181 static bool supports_monotonic_clock() { |
181 static inline bool supports_monotonic_clock() { |
182 return _clock_gettime != NULL; |
182 return _clock_gettime != NULL; |
183 } |
183 } |
184 |
184 |
185 static int clock_gettime(clockid_t clock_id, struct timespec *tp) { |
185 static int clock_gettime(clockid_t clock_id, struct timespec *tp) { |
186 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; |
186 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; |