extern int native_execve(const char *filename, const char *const argv[], const char *const envp[]);
extern int native_spawn(const char *filename, const char *const argv[], const char *const envp[]);
+extern int64_t native_timestamp(void);
+
// Syscalls used by the linker
extern int acess__SysOpen(const char *Path, unsigned int Flags);
extern void acess__SysClose(int FD);
# include <spawn.h> // posix_spawn
#endif
#include "request.h"
+#include <sys/time.h>
#define assert(cnd) do{ \
if( !(cnd) ) { \
return rv;
}
+
+int64_t native_timestamp(void)
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return tv.tv_sec*1000 + tv.tv_usec / 1000;
+}