SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Time Difference question

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Time Difference question
Author Message
Jane



Joined: 06 Dec 2002
Posts: 4

Post Time Difference question Reply with quote

Hi all,
I'm storing the start time and finish time of an sql statement
in 2 variables in a JAL job. I want to get the difference
between them and test it against a threshold of 10 seconds.
Here's what I've got so far:

Dim start_time, time
Dim end_time,time
Dim duration,time
Dim delay,boolean

now(start_time)

blah blah blah

now(end_time)

TimeDiff(start_time,end_time,duration)

Any advice would be appreciated.
Thanks


Thu Dec 12, 2002 8:00 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7963

Post Re: Time Difference question Reply with quote

The duration should be declared as a number, not as a time, because it returned as number of seconds.
Another way is to do it is to use the Timer statement which returns time in milliseconds

Dim start, number
Dim duration, number

Time 0, start

blah blah blah

Time start, duration

Please see examples in the on-line help for more info. While in Timer or TimeDiff help topics click the Examples button.

: Hi all,
: I'm storing the start time and finish time of an sql statement
: in 2 variables in a JAL job. I want to get the difference
: between them and test it against a threshold of 10 seconds.
: Here's what I've got so far: Dim start_time, time
: Dim end_time,time
: Dim duration,time
: Dim delay,boolean

: now(start_time)

: blah blah blah

: now(end_time)

: TimeDiff(start_time,end_time,duration)

: Any advice would be appreciated.
: Thanks

Thu Dec 12, 2002 9:36 am View user's profile Send private message
Jane



Joined: 06 Dec 2002
Posts: 4

Post Re: Time Difference question Reply with quote

I've got it all working now.

Thanks for the help.

Jane

: The duration should be declared as a number, not as a time, because it
: returned as number of seconds.
: Another way is to do it is to use the Timer statement which returns time in
: milliseconds

: Dim start, number
: Dim duration, number

: Time 0, start

: blah blah blah

: Time start, duration

: Please see examples in the on-line help for more info. While in Timer or
: TimeDiff help topics click the Examples button.

Thu Dec 12, 2002 10:47 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.