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

ich@xiaoyu:~$ ~/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

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to