Skip to content

Commit

Permalink
Use boot-time for sleep
Browse files Browse the repository at this point in the history
Boot-time: "This library reimplements std::time::Instant to use suspend-aware monotonic time if target system supports it.
Otherwise it uses monotonic time or reexports std::time::Instant."

Will be obsoleted when tokio-rs/tokio#3185 is resolved.

Fixes redlib-org#22
  • Loading branch information
Tokarak committed Jan 15, 2024
1 parent 0f148c5 commit ecbaa1b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ fastrand = "2.0.1"
log = "0.4.20"
pretty_env_logger = "0.5.0"
dotenvy = "0.15.7"
boot-time = "0.1.2"

[dev-dependencies]
lipsum = "0.9.0"
Expand Down
4 changes: 4 additions & 0 deletions src/oauth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ use log::info;

use serde_json::json;

use boot_time; /*"This library reimplements std::time::Instant to use suspend-aware monotonic time if target system supports it.
Otherwise it uses monotonic time or reexports std::time::Instant."
See #22. Will be obsoleted when https://github.com/tokio-rs/tokio/issues/3185 is resolved. */

static REDDIT_ANDROID_OAUTH_CLIENT_ID: &str = "ohXpoqrZYub1kg";

static AUTH_ENDPOINT: &str = "https://accounts.reddit.com";
Expand Down

0 comments on commit ecbaa1b

Please sign in to comment.