Skip to content

Do not use get_clock on windows where it is not supported. #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/proxy-wasm/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,17 @@ class ContextBase : public RootInterface,
}
uint32_t getLogLevel() override { return static_cast<uint32_t>(LogLevel::info); }
uint64_t getCurrentTimeNanoseconds() override {
#if !defined(_MSC_VER)
struct timespec tpe;
clock_gettime(CLOCK_REALTIME, &tpe);
uint64_t t = tpe.tv_sec;
t *= 1000000000;
t += tpe.tv_nsec;
return t;
#else
unimplemented();
return 0;
#endif
}
std::string_view getConfiguration() override {
unimplemented();
Expand Down