diff options
Diffstat (limited to 'src/modules/cmd_duration.rs')
-rw-r--r-- | src/modules/cmd_duration.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/cmd_duration.rs b/src/modules/cmd_duration.rs index a0340cb0c..7b31c80c3 100644 --- a/src/modules/cmd_duration.rs +++ b/src/modules/cmd_duration.rs @@ -11,10 +11,10 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { let mut module = context.new_module("cmd_duration"); let config: CmdDurationConfig = CmdDurationConfig::try_load(module.config); - let arguments = &context.arguments; - let elapsed = arguments - .value_of("cmd_duration") - .unwrap_or("invalid_time") + let props = &context.properties; + let elapsed = props + .get("cmd_duration") + .unwrap_or(&"invalid_time".into()) .parse::<u64>() .ok()?; |