Ok, so you're complaining that your computer is too fast... :) On a more serious note, you might be happier adding a counter field, which can be as simple as the index in the collection, a field in an RDBMS, or something that you increment and save into each object you create. Oddly enough, I encountered this same problem (again) only days ago, and have gone the implied counter route. In my case, each datum gets a line in a text file, so they are naturally ordered, and I make that concrete as I re-export the data for abuse[*] in R. Bill [*] thought for the day: if you torture data hard enough, they will confess to anything. -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Miguel Enrique Cobá Martinez Sent: Friday, February 12, 2010 2:21 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] DateAndTime and TimeStamp precision El vie, 12-02-2010 a las 20:08 +0100, Mariano Martinez Peck escribió:
I have no idea. I just remember this discussion:
http://n4.nabble.com/Nanosecond-level-profiling-in-Pharo-td1296771.htm l#a1296771
Thanks I remember reading something about in the list but couldn't find it anymore. Now, by reading it, people are talking about nanoseconds granularity. I don't want that level of granularity, but only to differentiate between two consecutive calls to time1 := DateAndTime now. time2 := DateAndTime now. self assert: [ (time2 - time1) > 0 ] I really don't care the specific granularity, only to be able to distinguish the creation of two objects without using an artificial delay between both creations. Or is this something not reasonable? Or how can I timestamp a lot of objects created in a loop inside the image? cheers
2010/2/12 Miguel Enrique Cobá Martinez <miguel.coba@gmail.com> 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
-- 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