| Index: native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc
|
| diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc b/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc
|
| index af314921cf86717f54e48913cbe1ff4724c7cd33..ff5896fda46bcd606695f2eabbc111976ff07bf2 100644
|
| --- a/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc
|
| +++ b/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc
|
| @@ -14,6 +14,7 @@
|
| #include <irt.h>
|
| #include <sys/mman.h>
|
| #include <sys/stat.h>
|
| +#include <sys/time.h>
|
| #include "nacl_io/kernel_intercept.h"
|
|
|
| EXTERN_C_BEGIN
|
| @@ -261,6 +262,11 @@ int _real_write(int fd, const void *buf, size_t count, size_t *nwrote) {
|
| return REAL(write)(fd, buf, count, nwrote);
|
| }
|
|
|
| +uint64_t usec_since_epoch() {
|
| + struct timeval tv;
|
| + gettimeofday(&tv, NULL);
|
| + return tv.tv_usec + (tv.tv_sec * 1000000);
|
| +}
|
|
|
| void kernel_wrap_init() {
|
| static bool wrapped = false;
|
|
|