Skip to content

Commit

Permalink
Merge pull request envoyproxy#141 from jplevyak/wasm-time
Browse files Browse the repository at this point in the history
Add getCurrentTimeNanoseconds wrapper.
  • Loading branch information
jplevyak authored Aug 20, 2019
2 parents db76070 + a3293c6 commit 0474f49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/wasm/cpp/proxy_wasm_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1628,3 +1628,8 @@ inline WasmResult ContextBase::setEffectiveContext() {
return proxy_setEffectiveContext(id_);
}

inline uint64_t getCurrentTimeNanoseconds() {
uint64_t t;
CHECK_RESULT(proxy_getCurrentTimeNanoseconds(&t));
return t;
}

0 comments on commit 0474f49

Please sign in to comment.