From 22f11f24c9868037e190f35b6f3eb8d9daadbce0 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 4 Nov 2008 17:23:08 -0600 Subject: [PATCH] Move simple-table. to prettyprint since its generally useful and not specific to tools.time --- basis/prettyprint/prettyprint.factor | 14 ++++++++++++++ basis/tools/time/time.factor | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/basis/prettyprint/prettyprint.factor b/basis/prettyprint/prettyprint.factor index f63ce44c71..b0293a8759 100644 --- a/basis/prettyprint/prettyprint.factor +++ b/basis/prettyprint/prettyprint.factor @@ -134,6 +134,20 @@ PRIVATE> : pprint-cell ( obj -- ) [ pprint ] with-cell ; +: simple-table. ( values -- ) + standard-table-style [ + [ + [ + [ + dup string? + [ [ write ] with-cell ] + [ pprint-cell ] + if + ] each + ] with-row + ] each + ] tabular-output ; + GENERIC: see ( defspec -- ) : comment. ( string -- ) diff --git a/basis/tools/time/time.factor b/basis/tools/time/time.factor index 3078f40e1a..6873d68316 100644 --- a/basis/tools/time/time.factor +++ b/basis/tools/time/time.factor @@ -7,20 +7,6 @@ IN: tools.time : benchmark ( quot -- runtime ) millis >r call millis r> - ; inline -: simple-table. ( values -- ) - standard-table-style [ - [ - [ - [ - dup string? - [ [ write ] with-cell ] - [ pprint-cell ] - if - ] each - ] with-row - ] each - ] tabular-output ; - : time. ( data -- ) unclip "==== RUNNING TIME" print nl pprint " ms" print nl