Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/uu/uptime/src/uptime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

// spell-checker:ignore getloadavg behaviour loadavg uptime upsecs updays upmins uphours boottime nusers utmpxname gettime clockid formated
// spell-checker:ignore getloadavg behaviour loadavg uptime upsecs updays upmins uphours boottime nusers utmpxname gettime clockid

use chrono::{Local, TimeZone, Utc};
use clap::ArgMatches;
Expand Down Expand Up @@ -296,6 +296,6 @@ fn print_time() {
}

fn print_uptime(boot_time: Option<time_t>) -> UResult<()> {
print!("up {}, ", get_formated_uptime(boot_time)?);
print!("up {}, ", get_formatted_uptime(boot_time)?);
Ok(())
}
4 changes: 2 additions & 2 deletions src/uucore/src/lib/features/uptime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

// spell-checker:ignore gettime BOOTTIME clockid boottime formated nusers loadavg getloadavg
// spell-checker:ignore gettime BOOTTIME clockid boottime nusers loadavg getloadavg

//! Provides functions to get system uptime, number of users and load average.

Expand Down Expand Up @@ -165,7 +165,7 @@ pub fn get_uptime(_boot_time: Option<time_t>) -> UResult<i64> {
///
/// Returns a UResult with the uptime in a human-readable format(e.g. "1 day, 3:45") if successful, otherwise an UptimeError.
#[inline]
pub fn get_formated_uptime(boot_time: Option<time_t>) -> UResult<String> {
pub fn get_formatted_uptime(boot_time: Option<time_t>) -> UResult<String> {
let up_secs = get_uptime(boot_time)?;

if up_secs < 0 {
Expand Down
Loading