SRL Archive - Help and Support

Well I didnt know where else to post this.. SCAR Bug..


n3ss3s

2007-10-14 06:55:00

GetTimeRunning is acting a bit weird, I tested my proggy, only the setup and ProgressReport in the main loop, and look what it gave in the hours place:

| Worked: 4,16666666666667E-6 hrs.       |
How the hell is that possible?? Yes I will add "Round" there later, but, the thing that returns the float there is
  I := GetTimeRunning;
Result := I / 1000 / 60 / 60;

So Im pretty sure the prob isnt in the code?

Also, if it is, then this belongs to SRL Help, other wise I dont know.. Answers pls :D

Pancakes

2007-10-14 06:57:15

You could just say it wasn't an error, thats just how long your script has been running for… say it was so 1337 that it needed to include letters in the time running :p

Killerdou

2007-10-14 07:04:53

E-6 is machine language for * 10 ^ - 6 ;) so / 1000000 or / 10^6

mastaraymond

2007-10-14 07:11:38

From: Killerdou
E-6 is machine language for * 10 ^ - 6 ;) so / 1000000 or / 10^6

Science notation..

function GetTimeRunning: Integer;
Returns the ammounts of ms that the script has been running.

if you run it for 1 sec… Ofcourse the hour time would suck ^^.

EDIT:
Use this function for time converting ;):
procedure ConvertTime(Ms: Integer; var H, M, S: Integer);
Converts miliseconds to hours, minutes and seconds.

mat_de_b

2007-10-14 07:54:21

Just use the string TimeRunning

R0b0t1

2007-10-14 11:18:12

Thats the number you forgot to convert to hours, N3ss3s.

Thats saying how many milliseconds your script ran…


Also, thats not a floating point number (Well, to you it may be). (Floating point in scar is 3.12121 or something)

n3ss3s

2007-10-14 12:14:29

Grr and when you do FloatToStr the dot changes to ',' -.-

Umm am I right that E = Exponent and for example 1,234E-3 means 1,234DecimalDecimalDecimal?


And GetTimeRunning should return the time in milliseconds, so I think I've done it right??

" Result := I / 1000 / 60 / 60;"

mastaraymond

2007-10-14 13:45:12

From: n3ss3s
Grr and when you do FloatToStr the dot changes to ',' -.-

Umm am I right that E = Exponent and for example 1,234E-3 means 1,234DecimalDecimalDecimal?


And GetTimeRunning should return the time in milliseconds, so I think I've done it right??

" Result := I / 1000 / 60 / 60;"
Yeah, for example you have ran the script 5 secs, thats 5000 ms. The converting will be: 5000 / 1000 / 60 / 60 =
0,0013888888888888888888888888888889. To small for SCAR… You can try Round\Trunc…..