Skip to content

Commit

Permalink
fix: add windows header
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk committed Sep 30, 2023
1 parent 342b235 commit 7a6092f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/native_ext/util/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ int64_t HrTime() { return uv_hrtime(); }
#endif

#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <sysinfoapi.h>
int64_t MicroSecondsSinceEpoch() {
FILETIME ft;
Expand All @@ -30,6 +32,7 @@ int64_t MicroSecondsSinceEpoch() {
t -= 116444736000000000LL;
return t / 10LL;
}
#undef WIN32_LEAN_AND_MEAN
#else
#include <time.h>
int64_t MicroSecondsSinceEpoch() {
Expand Down

0 comments on commit 7a6092f

Please sign in to comment.