From bea88844c465e2705ab02621eaaa2e5137553417 Mon Sep 17 00:00:00 2001
From: Jim Ursetto <zbigniewsz@gmail.com>
Date: Sun, 17 Jul 2011 20:22:12 -0500
Subject: [PATCH] Limit flonum print precision to 6 in ##sys#display-times
---
library.scm | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/library.scm b/library.scm
index 1d85a5b..91230df 100644
a
|
b
|
EOF |
4848 | 4848 | (define (pnum num) |
4849 | 4849 | (##sys#print (if (zero? num) "0" (##sys#number->string num)) #f ##sys#standard-error)) |
4850 | 4850 | (##sys#flush-output ##sys#standard-output) |
4851 | | (pnum (##sys#slot info 0)) |
4852 | | (pstr "s CPU time") |
4853 | | (let ((gctime (##sys#slot info 1))) |
4854 | | (when (> gctime 0) |
4855 | | (pstr ", ") |
4856 | | (pnum gctime) |
4857 | | (pstr "s GC time (major)"))) |
| 4851 | (let ((prec (flonum-print-precision 6))) |
| 4852 | (pnum (##sys#slot info 0)) |
| 4853 | (pstr "s CPU time") |
| 4854 | (let ((gctime (##sys#slot info 1))) |
| 4855 | (when (> gctime 0) |
| 4856 | (pstr ", ") |
| 4857 | (pnum gctime) |
| 4858 | (pstr "s GC time (major)"))) |
| 4859 | (flonum-print-precision prec)) |
4858 | 4860 | (let ((mut (##sys#slot info 2))) |
4859 | 4861 | (when (fx> mut 0) |
4860 | 4862 | (pstr ", ") |