--- a/Block.st Mon Nov 07 11:28:39 2016 +0100
+++ b/Block.st Mon Nov 07 11:49:17 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -708,6 +710,8 @@
"Created: / 28-08-2010 / 14:41:15 / cg"
! !
+
+
!Block methodsFor:'accessing'!
home
@@ -887,7 +891,7 @@
endTime := OperatingSystem getMicrosecondTime.
overhead := endTime - startTime.
"/ just in case, the OS does not support cpu cycles
- startCycles notNil ifTrue:[ overheadCycles := endCycles - startCycles ].
+ overheadCycles := endCycles - startCycles.
startTime := OperatingSystem getMicrosecondTime.
startCycles := OperatingSystem getCPUCycleCount.
@@ -896,16 +900,13 @@
endTime := OperatingSystem getMicrosecondTime.
micros := (endTime - startTime - overhead) max:0.
- "/ just in case, the OS does not support cpu cycles
- startCycles notNil ifTrue:[
- cycles := (endCycles - startCycles - overheadCycles) max:0.
- ].
+ cycles := (endCycles - startCycles - overheadCycles) max:0.
Transcript show:anInfoString.
micros < 1000 ifTrue:[
"/ too stupid: many fonts do not have a mu,
"/ so I output it as us here.
- Transcript show:micros; show:' µs'.
+ Transcript show:micros; show:' µs'.
] ifFalse:[
micros < 100000 ifTrue:[
millis := (micros / 1000.0) asFixedPointRoundedToScale:2.
@@ -915,7 +916,7 @@
Transcript show:(TimeDuration milliseconds:millis).
].
].
- cycles notNil ifTrue:[
+ cycles ~~ 0 ifTrue:[
Transcript show:' ('; show:cycles; show:' cycles)'.
].
Transcript cr.