so I want my proggy to write first the hours, then min and then sec, but in order to do so, I need the script to know the remainders of the division. basicly title says it all.
so I want my proggy to write first the hours, then min and then sec, but in order to do so, I need the script to know the remainders of the division. basicly title says it all.
http://www.macrosoftinc.com/ ---WTF COPIERS!!!
SCAR Code:5 Mod 2 = 1.
It divides 5 by 2 and gets the remainder.
[CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
[CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]
[CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]
This is already a function-
SCAR Code:function TimeRunning: string;
var
RHours, Minutes, Seconds, RMinutes, RSeconds: LongInt;
Time: string;
begin
Seconds := (GetSystemTime - ST) div 1000;
Minutes := Seconds div 60;
RHours := Minutes div 60;
Time := IntToStr(Seconds) + ' Seconds';
if Minutes <> 0 then
begin
RSeconds := Seconds mod (Minutes * 60);
Time := IntToStr(Minutes) + ' Minutes and ' + IntToStr(RSeconds) +
' Seconds';
end;
if RHours <> 0 then
begin
RMinutes := Minutes mod (RHours * 60);
RSeconds := Seconds mod (Minutes * 60);
Time := IntToStr(RHours) + ' Hours, ' + IntToStr(RMinutes) +
' Minutes and ' + IntToStr(RSeconds) + ' Seconds';
end;
Result := Time;
end;
So hopefully that tells you what you need to know.
The ST or Start Time is from MarkTime(ST) and just holds the time the script started.
So make sure you have SetUpSRL called for in your script to use this.
All you need in your script is SetUpSRL.
Then just put WriteLn(TimeRunning) where you want it.
But what i was saying is without the setup it won't know the time the script started.
There are currently 1 users browsing this thread. (0 members and 1 guests)