SRL Archive - SRL Archives

New time in "Timing.scar" suggestion


Narcle

2008-08-29 13:42:52

Ignore ;)
Edit:
I remember why I posted this. I hate how long TimeRunning; is… Hard to put in a progress report that fits well.

function ScriptRunTime: string;
var
H,M,S:integer;
begin
ConvertTime(gettimerunning, H, M, S);
result := inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s';
end;

Very small suggestion… But I use that way more then the other timers in the times include.

Idk if the letters in the output should be capitalized or not. Probably caps.

This would be used a lot in all progress reports.

EvilChicken!

2008-08-29 13:51:23

Very good suggestion, Narcle, although I would prefer something like this:

procedure ScriptRunTime(var H, M, S: Integer);
begin
ConvertTime(GetTimeRunning, H, M, S);
end;


I think you understand why I want it to be stored to vars. (Custom placing/usage of vars ect.)


Whaddyathink?


Edit2: *clears up head*


What is the difference between this and TimeRunning?

Narcle

2008-08-29 13:58:54

From: EvilChicken!
Very good suggestion, Narcle, although I would prefer something like this:

procedure ScriptRunTime(var H, M, S: Integer);
begin
ConvertTime(GetTimeRunning, H, M, S);
end;


I think you understand why I want it to be stored to vars. (Custom placing/usage of vars ect.)


Whaddyathink?


Edit2: *clears up head*


What is the difference between this and TimeRunning?


Not sure what the difference is exactly. Its probably the same. But anyways…

I have it a string output because all of the times in Timings.scar are string outputs. Making it easier to time stamp stuff. Using your method… you'd still have to declare all the variables just to writeln the stuff out. Defeating the purpose of having it included.

EvilChicken!

2008-08-29 14:03:08

That would be TimeRunning.

Narcle

2008-08-29 14:05:17

Well fuck, I've been missing it. Hrmm

Edit:
I remember why I posted this. I hate how long TimeRunning; is… Hard to put in a progress report that fits well.

Daniel

2008-08-29 22:34:39

From: EvilChicken!
Very good suggestion, Narcle, although I would prefer something like this:

procedure ScriptRunTime(var H, M, S: Integer);
begin
ConvertTime(GetTimeRunning, H, M, S);
end;


I think you understand why I want it to be stored to vars. (Custom placing/usage of vars ect.)


Whaddyathink?


Edit2: *clears up head*


What is the difference between this and TimeRunning?

ConvertTime is faster ;) Oh, also, what would be the point in that procedure? It'll be way easier (if doing your way) to just put ConvertTime(GetTimeRunning, H, M, S) instead of ScriptRunTime(H, M, S) ;)