[Updates] Microsecond resolution Time and TimeAndDate

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

[Updates] Microsecond resolution Time and TimeAndDate

Juan Vuletich-4
Hi Folks,

I've just published some updates and a new image. Biggest changes are in
Time and DateAndTime. After some cleanup (removed a PoolDictionary and
simplified code), I was able to dig deeper. Now we use the new 64 bit
clock primitives in Cog VMs if available. This gives microsecond
resolution Time and DateAndTime. In case the new primitives are not
available, a combination of the seconds clock and the rolling
millisecond clock is used. I redid the logic to synchronize them,
removing many class variables, and enabling a faster image startup. But
more important, users don't need to worry about millisecond clock roll
over anymore. It is handled by new logic I did, that is robust wrt the
moment the rollover occurs, and doesn't even need to know the clock max
value.

New code is much simpler, faster and robust. On Cog, it is yet even
faster, and with better temporal resolution.

I also added back ImageMorph >> #form, needed by Ken's Solitaire games.

Enjoy!

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: [Updates] Microsecond resolution Time and TimeAndDate

David T. Lewis
Nice!

FYI, the same set of time primitives is available in both Cog and the
interpreter VM, so future builds of both Cog and interpreter VM should
provide the necessary support. Right now it is probably missing from
the official interpreter VMs.

Dave

On Wed, Apr 17, 2013 at 05:52:35PM -0300, Juan Vuletich wrote:

> Hi Folks,
>
> I've just published some updates and a new image. Biggest changes are in
> Time and DateAndTime. After some cleanup (removed a PoolDictionary and
> simplified code), I was able to dig deeper. Now we use the new 64 bit
> clock primitives in Cog VMs if available. This gives microsecond
> resolution Time and DateAndTime. In case the new primitives are not
> available, a combination of the seconds clock and the rolling
> millisecond clock is used. I redid the logic to synchronize them,
> removing many class variables, and enabling a faster image startup. But
> more important, users don't need to worry about millisecond clock roll
> over anymore. It is handled by new logic I did, that is robust wrt the
> moment the rollover occurs, and doesn't even need to know the clock max
> value.
>
> New code is much simpler, faster and robust. On Cog, it is yet even
> faster, and with better temporal resolution.
>
> I also added back ImageMorph >> #form, needed by Ken's Solitaire games.
>
> Enjoy!
>
> Cheers,
> Juan Vuletich
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org