TimeStamp Class
Joan Barrull
joan.barrull at gmail.com
Thu Apr 7 20:45:14 UTC 2005
Hope this helps:
3 timesRepeat: [ Transcript cr; show:DateAndTime millisecondClockValue ]
Regards,
joan
On Apr 7, 2005 9:10 PM, Daniel Salama <dsalama at user.net> wrote:
> I'm trying to get the difference of two TimeStamps objects and the best
> accuracy I get is "asSeconds". When I try asMilliSeconds or
> asNanoSeconds, the result is simply padded with 0s. Is there a better
> way to get higher degree of accuracy? Maybe I'm just using the wrong
> classes. For example:
>
> epoch := TimeStamp date: (Date readFromString: '01-01-1970') time:
> (Time new).
> Transcript clear.
> 1 to: 20 do: [:i|
> Transcript cr; show: (((TimeStamp date: (Date today) time: (Time now))
> - epoch) asMilliSeconds)
> ].
>
> The idea behind is to get the number of milli seconds since the Epoch.
> Is there a better way to do this?
>
> Thanks,
> Daniel
>
>
More information about the Squeak-dev
mailing list
|