[Newbies] Re: Update Timer?
Kirk Fraser
overcomer.man at gmail.com
Sun May 3 05:31:13 UTC 2015
Woops! What if timer + 10 gets bigger than 60?
Time current - timer < 10
When you can't get help, help yourself!
On Sat, May 2, 2015 at 10:21 PM, Kirk Fraser <overcomer.man at gmail.com>
wrote:
> Sleeping on a problem helped in this case.
>
> Time current minutes < timer minutes + 10
> ifTrue: [^#waiting].
> timer := Time current.
>
> I put that in an update method called by methods that change the data.
> Not guaranteed every 10 min depending on user behavior but close enough and
> easier than defining a process.
>
>
> On Fri, May 1, 2015 at 10:14 PM, Kirk Fraser <overcomer.man at gmail.com>
> wrote:
>
>> I am building a simple database using a tree and a ReferenceStream as
>> learned here. I want it to update the disk file every 10 min. with the
>> current tree. What should I do?
>>
>> The classes Time, Duration, Stopwatch, Schedule, look like possibilities
>> but the only method that looks good is Schedule "between: aStart and: anEnd
>> do: aBlock" but I don't want it to hang waiting on the timer so the tree
>> can't take my changes. How do I make something perform like a text editor
>> that saves its work every 10 min?
>>
>> Thanks,
>>
>> Kirk Fraser
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20150502/a56a2b7b/attachment.htm
More information about the Beginners
mailing list