mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-12-22 19:49:28 +00:00
helper: fix doc test
This commit is contained in:
parent
ed598e374e
commit
29e2c4b2db
2 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,7 @@ const NON_ZERO_USIZE_1: NonZeroUsize = match NonZeroUsize::new(1) {
|
|||
/// Get the total amount of system threads.
|
||||
///
|
||||
/// ```rust
|
||||
/// # use helper::thread::*;
|
||||
/// # use cuprate_helper::thread::*;
|
||||
/// assert!(threads().get() >= 1);
|
||||
/// ```
|
||||
pub fn threads() -> NonZeroUsize {
|
||||
|
|
|
@ -10,7 +10,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
|
|||
/// Returns the current system time as a UNIX timestamp.
|
||||
///
|
||||
/// ```rust
|
||||
/// # use helper::time::*;
|
||||
/// # use cuprate_helper::time::*;
|
||||
/// assert!(current_unix_timestamp() > 0);
|
||||
/// ```
|
||||
///
|
||||
|
@ -34,7 +34,7 @@ pub fn current_unix_timestamp() -> u64 {
|
|||
/// The output is guaranteed to be in the range of `0..=86399`.
|
||||
///
|
||||
/// ```rust
|
||||
/// # use helper::time::*;
|
||||
/// # use cuprate_helper::time::*;
|
||||
/// // October 20th 2023 - 10:18:30 PM
|
||||
/// const TIME: u64 = 1697840310;
|
||||
///
|
||||
|
@ -58,7 +58,7 @@ pub const fn unix_clock(seconds_after_unix_epoch: u64) -> u32 {
|
|||
/// see [`secs_to_clock`] for clock-like behavior that wraps around on `24`
|
||||
///
|
||||
/// ```rust
|
||||
/// # use helper::time::*;
|
||||
/// # use cuprate_helper::time::*;
|
||||
/// // 59 seconds.
|
||||
/// assert_eq!(secs_to_hms(59), (0, 0, 59));
|
||||
///
|
||||
|
@ -99,7 +99,7 @@ pub const fn secs_to_hms(seconds: u64) -> (u64, u8, u8) {
|
|||
/// - The hours returned is guaranteed to be `0..=23`
|
||||
///
|
||||
/// ```rust
|
||||
/// # use helper::time::*;
|
||||
/// # use cuprate_helper::time::*;
|
||||
/// // 59 seconds.
|
||||
/// assert_eq!(secs_to_clock(59), (0, 0, 59));
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue