|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] Funny Delay timer bug with image suspend and resumption |
Date: | Thu, 22 Sep 2011 12:08:33 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 |
On 09/22/2011 11:51 AM, Holger Hans Peter Freyther wrote:
On 09/22/2011 10:34 AM, Paolo Bonzini wrote:> No modifications to the image, try the attached patch.~/install/gst/bin/gst -i -f foo.st 1 3001 6001 address@hidden:~$ ~/install/gst/bin/gst -I foo.img GNU Smalltalk ready st> stdin next 3001 6002 9003 12003 15004 18004 21004 24005 hmm... does this indicate a problem/clock drift? probably not
It is drift, but it's expected. With #forSeconds:/#forMilliseconds:, the time to execute the #printNl sums up and causes drift.
If you use untilMilliseconds:, it will work correctly: Eval [ Time millisecondClockValue printNl. Smalltalk at: #FOO put: [|n| n:= 0. [(Delay untilMilliseconds: (n :=n+1)*3000) wait. Time millisecondClockValue printNl] repeat] fork. ObjectMemory snapshot: 'foo.img'. stdin next ] $ gst -i -f foo.st 1 "Global garbage collection... done" 3001 6001 9002 12001 15001 18001 21002 24002 27001 $ ./gst -I foo.img GNU Smalltalk ready st> stdin next 3025 6001 9000 12001 15001 18000 Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |