cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
694
Views
0
Helpful
2
Replies

Java Steps

belz-e
Level 1
Level 1

does anyone know how to create Java steps to take 366 seconds and convert that to lets say 6 minutes and 6 seconds. So lets say Im doing the get reporting stat for expected wait time it returns the value in seconds I want to then convert that to minutes and seconds using java steps and then play it back on a container prompt.

Thanks,

Erik

2 Replies 2

mark.mcgregor
Level 4
Level 4

Hi Erik.

Do you absolutely have to do this with Java?

You could do this simply with a Set step (in the General folder)

For example, if you a retrieving Expected Wait Time using Get Reporting Statistic and store it as variable WaitTime, you could do this:

Set WaitMinutes = WaitTime/60

(where WaitTime is an integer.)

Furthermore, if you want to "round up":

Set WaitSeconds = (WaitTime/60 - WaitMinutes) * 60

If (WaitSeconds >=30) Then

--+True

----Increment WaitMinutes

--+False

----(empty)

Hope this helps,

Mark

Hey Mark,

your absolutely right I did not think of that.

Thanks you for your response.

Erik