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.
7 #include "native_client/src/include/nacl_macros.h"
8 #include "native_client/src/untrusted/irt/irt.h"
9 #include "native_client/src/untrusted/irt/irt_interfaces.h"
10 #include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
12 static int nacl_irt_clock_getres(nacl_irt_clockid_t clk_id,
13 struct timespec *res) {
14 return -NACL_SYSCALL(clock_getres)(clk_id, res);
17 static int nacl_irt_clock_gettime(nacl_irt_clockid_t clk_id,
18 struct timespec *tp) {
19 return -NACL_SYSCALL(clock_gettime)(clk_id, tp);
22 const struct nacl_irt_clock nacl_irt_clock = {
23 nacl_irt_clock_getres,
24 nacl_irt_clock_gettime,