Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0412]: cannot find type `Duration` in this scope
- --> src/main.rs:15:27
- |
- 15 | const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
- | ^^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Duration;
- |
- 1 | use core::time::Duration;
- |
- 1 | use crate::clock::Duration;
- |
- 1 | use std::time::Duration;
- |
- error[E0433]: failed to resolve: use of undeclared type `Duration`
- --> src/main.rs:15:38
- |
- 15 | const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
- | ^^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Duration;
- |
- 1 | use core::time::Duration;
- |
- 1 | use crate::clock::Duration;
- |
- 1 | use std::time::Duration;
- |
- error[E0412]: cannot find type `Duration` in this scope
- --> src/main.rs:16:23
- |
- 16 | const CLIENT_TIMEOUT: Duration = Duration::from_secs(10);
- | ^^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Duration;
- |
- 1 | use core::time::Duration;
- |
- 1 | use crate::clock::Duration;
- |
- 1 | use std::time::Duration;
- |
- error[E0433]: failed to resolve: use of undeclared type `Duration`
- --> src/main.rs:16:34
- |
- 16 | const CLIENT_TIMEOUT: Duration = Duration::from_secs(10);
- | ^^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Duration;
- |
- 1 | use core::time::Duration;
- |
- 1 | use crate::clock::Duration;
- |
- 1 | use std::time::Duration;
- |
- error[E0412]: cannot find type `Instant` in this scope
- --> src/main.rs:19:9
- |
- 19 | hb: Instant,
- | ^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Instant;
- |
- 1 | use crate::clock::Instant;
- |
- 1 | use std::time::Instant;
- |
- error[E0433]: failed to resolve: use of undeclared type `Instant`
- --> src/main.rs:32:20
- |
- 32 | Self { hb: Instant::now() }
- | ^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Instant;
- |
- 1 | use crate::clock::Instant;
- |
- 1 | use std::time::Instant;
- |
- error[E0433]: failed to resolve: use of undeclared type `Duration`
- --> src/main.rs:36:26
- |
- 36 | ctx.run_interval(Duration::from_secs(5), |act, ctx| {
- | ^^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Duration;
- |
- 1 | use core::time::Duration;
- |
- 1 | use crate::clock::Duration;
- |
- 1 | use std::time::Duration;
- |
- error[E0433]: failed to resolve: use of undeclared type `Instant`
- --> src/main.rs:50:27
- |
- 50 | self.hb = Instant::now();
- | ^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Instant;
- |
- 1 | use crate::clock::Instant;
- |
- 1 | use std::time::Instant;
- |
- error[E0433]: failed to resolve: use of undeclared type `Instant`
- --> src/main.rs:54:27
- |
- 54 | self.hb = Instant::now();
- | ^^^^^^^ not found in this scope
- |
- help: consider importing one of these items
- |
- 1 | use actix::clock::Instant;
- |
- 1 | use crate::clock::Instant;
- |
- 1 | use std::time::Instant;
- |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement