The Trunk: Morphic-mt.1080.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1080.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1080.mcz

==================== Summary ====================

Name: Morphic-mt.1080
Author: mt
Time: 15 February 2016, 4:58:32.640019 pm
UUID: b80fdc10-b798-4648-a016-5ea9a0c45ca5
Ancestors: Morphic-mt.1079

Fixes a regression in Morphic's inter-cycle delay. Hacking during the switch from DST to normal time forced the user to wait one hour. Opening images from different time zones did also show this bug.

=============== Diff against Morphic-mt.1079 ===============

Item was changed:
  ----- Method: WorldState>>interCyclePause: (in category 'update cycle') -----
  interCyclePause: milliSecs
  "delay enough that the previous cycle plus the amount of delay will equal milliSecs.  If the cycle is already expensive, then no delay occurs.  However, if the system is idly waiting for interaction from the user, the method will delay for a proportionally long time and cause the overall CPU usage of Squeak to be low.
  If the preference #serverMode is enabled, always do a complete delay of 50ms, independant of my argument. This prevents the freezing problem described in Mantis #6581"
 
  | millisecondsToWait |
  millisecondsToWait := Preferences serverMode
  ifTrue: [ 50 ]
  ifFalse: [
  (lastCycleTime isNil or: [ CanSurrenderToOS == false ])
  ifTrue: [ 0 ]
  ifFalse: [ milliSecs - (Time millisecondsSince: lastCycleTime) ] ].
+ (millisecondsToWait > 0 and: [millisecondsToWait <= milliSecs]) ifTrue: [
- millisecondsToWait > 0 ifTrue: [
  (interCycleDelay isNil or: [ interCycleDelay beingWaitedOn ])
  ifTrue: [ interCycleDelay := Delay forMilliseconds: millisecondsToWait ]
  ifFalse: [ interCycleDelay delayDuration: millisecondsToWait ].
  interCycleDelay wait ].
  lastCycleTime := Time millisecondClockValue.
  CanSurrenderToOS := true.!