Subject Re: [ib-support] TimeStamp
Author Helen Borrie
Hans,

AFAIK, it is not a bug - the CURRENT_TIMESTAMP behaviour is "as designed" - I believe its purpose is to timestamp the beginning of a physical transaction; as contrasted with 'NOW' which returns the timestamp at the moment of execution.

Some months ago Charlie Caro posted a fairly detailed description of what's happening with these timestamps - try searching at mers.com or, failing that, try Google.

Regards,
Helen

At 09:37 PM 25-08-01 -0600, you wrote:
>Helen,
>Thank You.
>
>You peeked at the docs :)
>
>I assumed Current_TimeStamp would mean Current as Now This Moment
>
>Now
>
>CREATE PROCEDURE TESTTIME
>RETURNS (CTIME TIMESTAMP )
>AS
>BEGIN
> CTIME = CURRENT_TIMESTAMP;
> SUSPEND;
>END
>
>along with
>
>CREATE PROCEDURE TEST
>RETURNS ( T1 TIMESTAMP
> , T2 TIMESTAMP )
>AS
>BEGIN
> SELECT CTIME FROM TESTTIME INTO :T1; // Avoid BUG
> T2 = T1;
> WHILE (T1 >= T2) DO
> SELECT CTIME FROM TESTTIME INTO :T2; // Avoid BUG
>SUSPEND;
>END
>
>works as great as your much shorter suggestion :)
>
>Finally I can time my Procedures by replacing the
>WHILE (T1 >= T2) DO with what ever coding I want to time.
>
> > CREATE PROCEDURE TEST
> > RETURNS ( T1 TIMESTAMP
> > , T2 TIMESTAMP )
> > AS
> > BEGIN
> > T1 = CURRENT_TIMESTAMP;
> > T2 = T1
> > /* Equal at start of loop
> > WHILE (T1 >= T2) DO
> > T2 = CURRENT_TIMESTAMP; /* No new value - T1 and T2 stay the same
> >
> > SUSPEND;
> > END
> >
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________