With the Mac VM 5.4b1 I have a microsecond clock. http://n4.nabble.com/microsecond-timing-for-GC-work-td1016253.html zero feedback, maybe it's too fast and you never get above 1 millisecond in testing eh? On 2010-02-12, at 12:46 PM, csrabak@bol.com.br wrote:
Miguel,
Pharo allows you to drill down to millisecond resolution, but for your 'benchmark' that's still too coarse:
{DateAndTime. TimeStamp } collect: [ :class | | list | list := OrderedCollection new. 1 to: 1000 do: [ :each | value := class millisecondClockValue. list add: value ]. list last - list first ].
I get an Array (1 1).
Changing from 1000 to 100000 (hundred fold) I got #(77 141).
HTH
-- Cesar Rabak
Em 12/02/2010 17:02, Miguel Enrique Cobá Martinez < miguel.coba@gmail.com > escreveu: I am noticing that both
DateAndTime now TimeStamp now
have a precision of seconds, that is, the nanos is always 0.
I am doing a bulk data creation and inserting them in a list with a timestamp for each insertion but this isn't working because several entries have the very same DateAndTime or Timestamp.
For example:
{DateAndTime. TimeStamp } collect: [ :class | | list | list := OrderedCollection new. 1 to: 1000 do: [ :each | value := class now. list add: value ]. list last - list first ]
gives an Array(0:00:00:00 0:00:00:00)
How can achieve smaller than a second timestamping in Pharo? -- Miguel Cobá http://miguel.leugim.com.mx
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- =========================================================================== John M. McIntosh <johnmci@smalltalkconsulting.com> Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================