Some total-time stuff

This commit is contained in:
greg 2019-05-21 02:52:26 -07:00
parent eb2adb5b79
commit 5cdc2f3d07

View File

@ -250,9 +250,15 @@ impl Repl {
CommandTree::nonterm("show-immediate", None, passes_directives.clone()),
CommandTree::nonterm("show", None, passes_directives.clone()),
CommandTree::nonterm("hide", None, passes_directives.clone()),
CommandTree::nonterm("timing", None, vec![
CommandTree::nonterm_no_further_tab_completions("on", None),
CommandTree::nonterm_no_further_tab_completions("off", None),
CommandTree::nonterm("total-time", None, vec![
CommandTree::term_with_function("on", None, vec![], Box::new(|repl: &mut Repl, _: &[&str]| {
repl.options.show_total_time = true;
None
})),
CommandTree::term_with_function("off", None, vec![], Box::new(|repl: &mut Repl, _: &[&str]| {
repl.options.show_total_time = false;
None
})),
])
],
Box::new(|repl: &mut Repl, cmds: &[&str]| {