--- a/Block.st Sun Feb 05 17:02:20 2017 +0100
+++ b/Block.st Sun Feb 05 18:22:39 2017 +0100
@@ -709,7 +709,6 @@
! !
-
!Block methodsFor:'accessing'!
home
@@ -889,7 +888,7 @@
endTime := OperatingSystem getMicrosecondTime.
overhead := endTime - startTime.
"/ just in case, the OS does not support cpu cycles
- overheadCycles := endCycles - startCycles.
+ startCycles notNil ifTrue:[ overheadCycles := endCycles - startCycles ].
startTime := OperatingSystem getMicrosecondTime.
startCycles := OperatingSystem getCPUCycleCount.
@@ -898,7 +897,10 @@
endTime := OperatingSystem getMicrosecondTime.
micros := (endTime - startTime - overhead) max:0.
- cycles := (endCycles - startCycles - overheadCycles) max:0.
+ "/ just in case, the OS does not support cpu cycles
+ startCycles notNil ifTrue:[
+ cycles := (endCycles - startCycles - overheadCycles) max:0.
+ ].
Transcript show:anInfoString.
micros < 1000 ifTrue:[
@@ -914,7 +916,7 @@
Transcript show:(TimeDuration milliseconds:millis).
].
].
- cycles ~~ 0 ifTrue:[
+ cycles notNil ifTrue:[
Transcript show:' ('; show:cycles; show:' cycles)'.
].
Transcript cr.