-
Notifications
You must be signed in to change notification settings - Fork 11
fix: Use wasmtimer in wasm
#41
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--> src/mutation.rs:26:5
|
26 | use webtime::Instant;
| ^^^^^^^ use of unresolved module or unlinked crate `webtime`
|
help: there is a crate or module with a similar name
|
26 | use web_time::Instant;
| +
12:23:34 [cargo] error[E0432]: unresolved import `webtime`
--> src/query.rs:30:5
|
30 | use webtime::Instant;
| ^^^^^^^ use of unresolved module or unlinked crate `webtime`
|
help: there is a crate or module with a similar name
|
30 | use web_time::Instant;
| +
12:23:34 [cargo] error[E0433]: failed to resolve: could not find `time` in `tokio`
--> src/query.rs:233:28
|
233 | tokio::time::sleep(interval).await;
| ^^^^ could not find `time` in `tokio`
|
note: found an item that was configured out
--> /Users/wheregmis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.45.1/src/lib.rs:555:13
|
555 | pub mod time;
| ^^^^
note: the item is gated behind the `time` feature
--> /Users/wheregmis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.45.1/src/lib.rs:554:1
|
554 | / cfg_time! {
555 | | pub mod time;
556 | | }
| |_^
= note: this error originates in the macro `cfg_time` (in Nightly builds, run with -Z macro-backtrace for more info)
12:23:34 [cargo] error[E0433]: failed to resolve: could not find `time` in `tokio`
--> src/query.rs:261:24
|
261 | tokio::time::sleep(query.clean_time).await;
| ^^^^ could not find `time` in `tokio`
|
note: found an item that was configured out
--> /Users/wheregmis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.45.1/src/lib.rs:555:13
|
555 | pub mod time;
| ^^^^
note: the item is gated behind the `time` feature
--> /Users/wheregmis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.45.1/src/lib.rs:554:1
|
554 | / cfg_time! {
555 | | pub mod time;
556 | | }
| |_^
= note: this error originates in the macro `cfg_time` (in Nightly builds, run with -Z macro-backtrace for more info)
12:23:34 [cargo] error[E0433]: failed to resolve: could not find `time` in `tokio`
--> src/query.rs:323:24
|
323 | tokio::time::sleep(query.clean_time).await;
| ^^^^ could not find `time` in `tokio`
|
note: found an item that was configured out
--> /Users/wheregmis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.45.1/src/lib.rs:555:13
|
555 | pub mod time;
| ^^^^
note: the item is gated behind the `time` feature
--> /Users/wheregmis/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.45.1/src/lib.rs:554:1
|
554 | / cfg_time! {
555 | | pub mod time;
556 | | }
| |_^
= note: this error originates in the macro `cfg_time` (in Nightly builds, run with -Z macro-backtrace for more info)
12:23:34 [cargo] error[E0433]: failed to resolve: could not find `Instant` in `time`
--> src/query.rs:116:24
|
116 | } => time::Instant::now().duration_since(*settlement_instant) >= query.stale_time,
| ^^^^^^^ could not find `Instant` in `time`
|
help: consider importing one of these structs
|
1 + use std::time::Instant;
|
1 + use wasmtimer::std::Instant;
|
1 + use web_time::Instant;
|
help: if you import `Instant`, refer to it directly
|
116 - } => time::Instant::now().duration_since(*settlement_instant) >= query.stale_time,
116 + } => Instant::now().duration_since(*settlement_instant) >= query.stale_time,
|
12:23:34 [cargo] error[E0308]: mismatched types
--> src/query.rs:116:78
|
88 | impl<Q: QueryCapability> QueryStateData<Q> {
| - expected this type parameter
...
116 | } => time::Instant::now().duration_since(*settlement_instant) >= query.stale_time,
| ^^^^^^^^^^^^^^^^ expected type parameter `Q`, found `Duration`
|
= note: expected type parameter `Q`
found struct `Duration` |
12:27:51 [cargo] error[E0433]: failed to resolve: could not find `Instant` in `time`
--> src/query.rs:116:24
|
116 | } => time::Instant::now().duration_since(*settlement_instant) >= query.stale_time,
| ^^^^^^^ could not find `Instant` in `time`
|
help: consider importing one of these structs
|
1 + use std::time::Instant;
|
1 + use wasmtimer::std::Instant;
|
1 + use web_time::Instant;
|
help: if you import `Instant`, refer to it directly
|
116 - } => time::Instant::now().duration_since(*settlement_instant) >= query.stale_time,
116 + } => Instant::now().duration_since(*settlement_instant) >= query.stale_time,
|
12:27:51 [cargo] error[E0308]: mismatched types
--> src/query.rs:116:78
|
88 | impl<Q: QueryCapability> QueryStateData<Q> {
| - expected this type parameter
...
116 | } => time::Instant::now().duration_since(*settlement_instant) >= query.stale_time,
| ^^^^^^^^^^^^^^^^ expected type parameter `Q`, found `Duration`
|
= note: expected type parameter `Q` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.