2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
9 #include "native_client/src/untrusted/nacl/nacl_irt.h"
11 void __libnacl_irt_clock_init(void) {
12 __libnacl_irt_query(NACL_IRT_CLOCK_v0_1,
13 &__libnacl_irt_clock, sizeof(__libnacl_irt_clock));
16 int clock_gettime(clockid_t clock_id, struct timespec *tp) {
17 if (!__libnacl_irt_init_fn(&__libnacl_irt_clock.clock_gettime,
18 __libnacl_irt_clock_init)) {
22 int error = __libnacl_irt_clock.clock_gettime(clock_id, tp);