mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-03 06:27:45 +00:00
Rename time.rs to parse_time.rs
Conflicts with crate time.
This commit is contained in:
parent
28302555b8
commit
13f5994e15
3 changed files with 7 additions and 7 deletions
|
@ -20,8 +20,8 @@ use std::u32::MAX as U32_MAX;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod util;
|
mod util;
|
||||||
|
|
||||||
#[path = "../common/time.rs"]
|
#[path = "../common/parse_time.rs"]
|
||||||
mod time;
|
mod parse_time;
|
||||||
|
|
||||||
static NAME: &'static str = "sleep";
|
static NAME: &'static str = "sleep";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = "1.0.0";
|
||||||
|
@ -67,7 +67,7 @@ specified by the sum of their values.", NAME, VERSION);
|
||||||
|
|
||||||
fn sleep(args: Vec<String>) {
|
fn sleep(args: Vec<String>) {
|
||||||
let sleep_time = args.iter().fold(0.0, |result, arg|
|
let sleep_time = args.iter().fold(0.0, |result, arg|
|
||||||
match time::from_str(&arg[..]) {
|
match parse_time::from_str(&arg[..]) {
|
||||||
Ok(m) => m + result,
|
Ok(m) => m + result,
|
||||||
Err(f) => crash!(1, "{}", f),
|
Err(f) => crash!(1, "{}", f),
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,8 +22,8 @@ use std::os::unix::process::ExitStatusExt;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod util;
|
mod util;
|
||||||
|
|
||||||
#[path = "../common/time.rs"]
|
#[path = "../common/parse_time.rs"]
|
||||||
mod time;
|
mod parse_time;
|
||||||
|
|
||||||
#[path = "../common/signals.rs"]
|
#[path = "../common/signals.rs"]
|
||||||
mod signals;
|
mod signals;
|
||||||
|
@ -70,7 +70,7 @@ Usage:
|
||||||
let status = matches.opt_present("preserve-status");
|
let status = matches.opt_present("preserve-status");
|
||||||
let foreground = matches.opt_present("foreground");
|
let foreground = matches.opt_present("foreground");
|
||||||
let kill_after = match matches.opt_str("kill-after") {
|
let kill_after = match matches.opt_str("kill-after") {
|
||||||
Some(tstr) => match time::from_str(&tstr) {
|
Some(tstr) => match parse_time::from_str(&tstr) {
|
||||||
Ok(time) => time,
|
Ok(time) => time,
|
||||||
Err(f) => {
|
Err(f) => {
|
||||||
show_error!("{}", f);
|
show_error!("{}", f);
|
||||||
|
@ -89,7 +89,7 @@ Usage:
|
||||||
},
|
},
|
||||||
None => signals::signal_by_name_or_value("TERM").unwrap()
|
None => signals::signal_by_name_or_value("TERM").unwrap()
|
||||||
};
|
};
|
||||||
let duration = match time::from_str(&matches.free[0]) {
|
let duration = match parse_time::from_str(&matches.free[0]) {
|
||||||
Ok(time) => time,
|
Ok(time) => time,
|
||||||
Err(f) => {
|
Err(f) => {
|
||||||
show_error!("{}", f);
|
show_error!("{}", f);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue