freebsd: add uv_hrtime().
This commit is contained in:
parent
cef595eedc
commit
1a0e452de1
@ -21,9 +21,21 @@
|
||||
#include "uv.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#undef NANOSEC
|
||||
#define NANOSEC 1000000000
|
||||
|
||||
uint64_t uv_hrtime(void) {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
return (ts.tv_sec * NANOSEC + ts.tv_nsec);
|
||||
}
|
||||
|
||||
|
||||
int uv_exepath(char* buffer, size_t* size) {
|
||||
uint32_t usize;
|
||||
int result;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user