File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -237,12 +237,17 @@ class ContextBase : public RootInterface,
237
237
WasmResult log (uint32_t /* level */ , std::string_view /* message */ ) override {
238
238
return unimplemented ();
239
239
}
240
- uint32_t getLogLevel () override { return static_cast <uint32_t >(LogLevel::info); }
240
+ uint32_t getLogLevel () override {
241
+ unimplemented ();
242
+ return 0 ;
243
+ }
241
244
uint64_t getCurrentTimeNanoseconds () override {
242
- return std::chrono::system_clock::now ().time_since_epoch ().count ();
245
+ unimplemented ();
246
+ return 0 ;
243
247
}
244
248
uint64_t getMonotonicTimeNanoseconds () override {
245
- return std::chrono::steady_clock::now ().time_since_epoch ().count ();
249
+ unimplemented ();
250
+ return 0 ;
246
251
}
247
252
std::string_view getConfiguration () override {
248
253
unimplemented ();
Original file line number Diff line number Diff line change @@ -98,6 +98,17 @@ class TestContext : public ContextBase {
98
98
99
99
bool isLogged (std::string_view message) { return log_.find (message) != std::string::npos; }
100
100
101
+ uint64_t getCurrentTimeNanoseconds () override {
102
+ return std::chrono::duration_cast<std::chrono::nanoseconds>(
103
+ std::chrono::system_clock::now ().time_since_epoch ())
104
+ .count ();
105
+ }
106
+ uint64_t getMonotonicTimeNanoseconds () override {
107
+ return std::chrono::duration_cast<std::chrono::nanoseconds>(
108
+ std::chrono::steady_clock::now ().time_since_epoch ())
109
+ .count ();
110
+ }
111
+
101
112
private:
102
113
std::string log_;
103
114
};
You can’t perform that action at this time.
0 commit comments