DateAndTime millisecond is always 0

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

DateAndTime millisecond is always 0

Denis Kudriashov
Hello.

How I can get current time milliseconds parameter?

I try  DateAndTime millisecond. But it always zero.
And DateAndTime nanoSecond is always zero too.

Is it bug?

I use Pharo1.1
Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Denis Kudriashov
I investigate squeak code. Its all work right with milli/nano seconds.
And implementation of DateAndTime very different. It has class variables LastTicks and more. And #now method use it.

Is it new implementation that should be integrated to pharo?
Or pharo drop this implementation? Why?

2011/1/14 Denis Kudriashov <[hidden email]>
Hello.

How I can get current time milliseconds parameter?

I try  DateAndTime millisecond. But it always zero.
And DateAndTime nanoSecond is always zero too.

Is it bug?

I use Pharo1.1

Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Denis Kudriashov
I think it's solved by Issue 3236: Cuis DateAndTime Enhancement

2011/1/14 Denis Kudriashov <[hidden email]>
I investigate squeak code. Its all work right with milli/nano seconds.
And implementation of DateAndTime very different. It has class variables LastTicks and more. And #now method use it.

Is it new implementation that should be integrated to pharo?
Or pharo drop this implementation? Why?

2011/1/14 Denis Kudriashov <[hidden email]>

Hello.

How I can get current time milliseconds parameter?

I try  DateAndTime millisecond. But it always zero.
And DateAndTime nanoSecond is always zero too.

Is it bug?

I use Pharo1.1


Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Adrian Lienhard
In reply to this post by Denis Kudriashov
Hi Denis,

There's no method milliseconds (at least in my Pharo 1.1.1 image). Can you be more specific?

I assume you want to get the milli seconds of a timestamp, rather than the millisecond clock (DateAndTime millisecondClockValue).

When you create a new timestamp (TimeStamp now) the milli/nano seconds are indeed 0. The reason is that the timestamp is initialized from "Time totalSeconds".

So I consider this not as a bug but something that could be improved.

Cheers,
Adrian

BTW, I remember having seen a fix on Mantis (= Squeak bug tracker) which asserts that TimeStamp now < TimeStamp now.


On Jan 14, 2011, at 10:20 , Denis Kudriashov wrote:

> Hello.
>
> How I can get current time milliseconds parameter?
>
> I try  DateAndTime millisecond. But it always zero.
> And DateAndTime nanoSecond is always zero too.
>
> Is it bug?
>
> I use Pharo1.1


Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Denis Kudriashov
Sorry,

I meen DateAndTime now millisecond and DateAndTime now nanoSecond.

As I write in last mail. I found cuis fix of this in Pharo issues

2011/1/14 Adrian Lienhard <[hidden email]>
Hi Denis,

There's no method milliseconds (at least in my Pharo 1.1.1 image). Can you be more specific?

I assume you want to get the milli seconds of a timestamp, rather than the millisecond clock (DateAndTime millisecondClockValue).

When you create a new timestamp (TimeStamp now) the milli/nano seconds are indeed 0. The reason is that the timestamp is initialized from "Time totalSeconds".

So I consider this not as a bug but something that could be improved.

Cheers,
Adrian

BTW, I remember having seen a fix on Mantis (= Squeak bug tracker) which asserts that TimeStamp now < TimeStamp now.


On Jan 14, 2011, at 10:20 , Denis Kudriashov wrote:

> Hello.
>
> How I can get current time milliseconds parameter?
>
> I try  DateAndTime millisecond. But it always zero.
> And DateAndTime nanoSecond is always zero too.
>
> Is it bug?
>
> I use Pharo1.1



Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Stéphane Ducasse

On Jan 14, 2011, at 11:24 AM, Denis Kudriashov wrote:

> Sorry,
>
> I meen DateAndTime now millisecond and DateAndTime now nanoSecond.
>
> As I write in last mail. I found cuis fix of this in Pharo issues


where?

Denis please provide more information else we all have to spend more time to answer and decide the next action.

Stef

>
> 2011/1/14 Adrian Lienhard <[hidden email]>
> Hi Denis,
>
> There's no method milliseconds (at least in my Pharo 1.1.1 image). Can you be more specific?
>
> I assume you want to get the milli seconds of a timestamp, rather than the millisecond clock (DateAndTime millisecondClockValue).
>
> When you create a new timestamp (TimeStamp now) the milli/nano seconds are indeed 0. The reason is that the timestamp is initialized from "Time totalSeconds".
>
> So I consider this not as a bug but something that could be improved.
>
> Cheers,
> Adrian
>
> BTW, I remember having seen a fix on Mantis (= Squeak bug tracker) which asserts that TimeStamp now < TimeStamp now.
>
>
> On Jan 14, 2011, at 10:20 , Denis Kudriashov wrote:
>
> > Hello.
> >
> > How I can get current time milliseconds parameter?
> >
> > I try  DateAndTime millisecond. But it always zero.
> > And DateAndTime nanoSecond is always zero too.
> >
> > Is it bug?
> >
> > I use Pharo1.1
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Adrian Lienhard
On Jan 15, 2011, at 09:21 , Stéphane Ducasse wrote:

>
> On Jan 14, 2011, at 11:24 AM, Denis Kudriashov wrote:
>
>> Sorry,
>>
>> I meen DateAndTime now millisecond and DateAndTime now nanoSecond.
>>
>> As I write in last mail. I found cuis fix of this in Pharo issues
>
>
> where?

Denis sent a link to the issue in question in a previous mail in this thread:

http://code.google.com/p/pharo/issues/detail?id=3236

Adrian


__________________________
www.adrian-lienhard.ch
twitter.com/adrianlienhard


Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Stéphane Ducasse
Thanks I could not see it ;/

Stef

On Jan 15, 2011, at 9:50 AM, Adrian Lienhard wrote:

> On Jan 15, 2011, at 09:21 , Stéphane Ducasse wrote:
>
>>
>> On Jan 14, 2011, at 11:24 AM, Denis Kudriashov wrote:
>>
>>> Sorry,
>>>
>>> I meen DateAndTime now millisecond and DateAndTime now nanoSecond.
>>>
>>> As I write in last mail. I found cuis fix of this in Pharo issues
>>
>>
>> where?
>
> Denis sent a link to the issue in question in a previous mail in this thread:
>
> http://code.google.com/p/pharo/issues/detail?id=3236
>
> Adrian
>
>
> __________________________
> www.adrian-lienhard.ch
> twitter.com/adrianlienhard
>
>


Reply | Threaded
Open this post in threaded view
|

Re: DateAndTime millisecond is always 0

Stéphane Ducasse
In reply to this post by Adrian Lienhard
so simple you see
if people wants to get that in pharo
        - get a changeset out of the text
        - check in cuis if there are other changes
        - tests?

Stef
       
On Jan 15, 2011, at 9:50 AM, Adrian Lienhard wrote:

> On Jan 15, 2011, at 09:21 , Stéphane Ducasse wrote:
>
>>
>> On Jan 14, 2011, at 11:24 AM, Denis Kudriashov wrote:
>>
>>> Sorry,
>>>
>>> I meen DateAndTime now millisecond and DateAndTime now nanoSecond.
>>>
>>> As I write in last mail. I found cuis fix of this in Pharo issues
>>
>>
>> where?
>
> Denis sent a link to the issue in question in a previous mail in this thread:
>
> http://code.google.com/p/pharo/issues/detail?id=3236
>
> Adrian
>
>
> __________________________
> www.adrian-lienhard.ch
> twitter.com/adrianlienhard
>
>