From 5cdc2f3d0791b28a3831a8ebc1bf59dc5ea75ce5 Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 21 May 2019 02:52:26 -0700 Subject: [PATCH] Some total-time stuff --- schala-repl/src/repl/mod.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/schala-repl/src/repl/mod.rs b/schala-repl/src/repl/mod.rs index 13b6ad5..99b6755 100644 --- a/schala-repl/src/repl/mod.rs +++ b/schala-repl/src/repl/mod.rs @@ -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]| {