Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: sysdeps/nacl/clock_gettime.c

Issue 22802003: Enable process and thread CPU time clocks (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <errno.h> 1 #include <errno.h>
2 #include <time.h> 2 #include <time.h>
3 3
4 #include <irt_syscalls.h> 4 #include <irt_syscalls.h>
5 5
6 #define SYSDEP_GETTIME \ 6 #define SYSDEP_GETTIME \
7 case CLOCK_REALTIME: \ 7 case CLOCK_REALTIME: \
8 case CLOCK_MONOTONIC: \ 8 case CLOCK_MONOTONIC: \
9 case CLOCK_PROCESS_CPUTIME_ID: \
10 case CLOCK_THREAD_CPUTIME_ID: \
9 { \ 11 { \
10 int result = __nacl_irt_clock_gettime (clock_id, tp); \ 12 int result = __nacl_irt_clock_gettime (clock_id, tp); \
11 if (result != 0) \ 13 if (result != 0) \
12 { \ 14 { \
13 __set_errno (result); \ 15 __set_errno (result); \
14 retval = -1; \ 16 retval = -1; \
15 } \ 17 } \
16 else \ 18 else \
17 retval = 0; \ 19 retval = 0; \
18 } \ 20 } \
19 break; 21 break;
20 22
21 #define HANDLED_REALTIME 23 #define HANDLED_REALTIME
Roland McGrath 2013/08/14 18:40:10 #define HANDLED_CPUTIME
Petr Hosek 2013/08/15 21:04:23 Added.
22 24
23 #include <sysdeps/unix/clock_gettime.c> 25 #include <sysdeps/unix/clock_gettime.c>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698