~ chicken-core (chicken-5) 4fa1723232cd58846131908f61f8e127e48d0196
commit 4fa1723232cd58846131908f61f8e127e48d0196 Author: felix <bunny351@gmail.com> AuthorDate: Wed May 5 09:13:01 2010 +0200 Commit: felix <bunny351@gmail.com> CommitDate: Wed May 5 09:13:01 2010 +0200 even more compact time macro output diff --git a/library.scm b/library.scm index 40879434..1ebd40f5 100644 --- a/library.scm +++ b/library.scm @@ -4638,12 +4638,26 @@ EOF (##sys#print (if (zero? num) "0" (##sys#number->string num)) #f ##sys#standard-error)) (##sys#flush-output ##sys#standard-output) (pnum (##sys#slot info 0)) - (pstr "s elapsed, ") - (pnum (##sys#slot info 1)) - (pstr "s (major) GC, ") - (pnum (##sys#slot info 2)) - (pstr " mutations, GCs: ") - (pnum (##sys#slot info 3)) - (pstr " minor, ") - (pnum (##sys#slot info 4)) - (pstr " major\n") ) + (pstr "s elapsed") + (let ((gctime (##sys#slot info 1))) + (when (> gctime 0) + (pstr ", ") + (pnum gctime) + (pstr "s (major) GC"))) + (let ((mut (##sys#slot info 2))) + (when (fx> mut 0) + (pstr ", ") + (pnum mut) + (pstr " mutations"))) + (let ((minor (##sys#slot info 3))) + (when (fx> minor 0) + (pstr ", GCs: ") + (pnum minor) + (pstr " minor"))) + (let ((major (##sys#slot info 4))) + (when (fx> major 0) + (pstr ", ") + (pnum major) + (pstr " major"))) + (##sys#write-char-0 #\newline ##sys#standard-error)) +Trap