And if this just for a graphical clock, a morph with step should be doing the trick. stepTime can be set as well.
Phil On Mon, Oct 3, 2016 at 10:09 AM, Denis Kudriashov <dionisi...@gmail.com> wrote: > Hi. > > 2016-10-03 9:49 GMT+02:00 CodeDmitry <dimamakh...@gmail.com>: > >> a JavaScript timeout is a function that takes a block and a period of >> time, >> and after this period of time, puts the block at the end of the event >> queue, to be executed as soon as the runtime is done performing the tasks >> in >> front of it. >> >> I am not sure if Pharo has an event queue, so it's a bit harder to do >> it(since without one you can't ensure only one thing happens at a time, >> and >> strange things can happen). >> >> That said, in simplest terms, imagine writing a clock app for Pharo, which >> updates time every second, in JS this would be done by setting an interval >> that ticks every 1000ms, and each time places the callback function(block) >> at the end of the event queue. >> > > In Pharo we have cheap green threads. You can write this: > > ["your code". > 1 seconds wait.] fork. > > > Also look at project TaskIt https://github.com/sbragagnolo/taskit. It > provides many high level scheduling capabilities. > >