SRL Archive - Help

Runs per hour


sm0k3

2011-04-18 17:23:38

Could somone make mea runs per hour function that returns the current runs per hour calculated from runs currently done an hour .. :)
i am rubbish with maths .. can work it out . :)

HarryJames

2011-04-18 17:33:10


function xPerHour(what:Integer) : Integer
begin
result := Round(3600 * what / (GetTimeRunning div 1000 + 1));
end;

Should do the job :)

Troll

2011-04-18 17:34:07


Function(TimeRunning,Runs:Integer):Integer;
Begin
Result := ((60/TimeRunning)*Runs);
End;

Just did in my head but should work, not so sure about compile though

E: no as it wont all ways be integers, other then that works, plus i got ninjaed

Richard

2011-04-18 19:48:52

Speed = Distance / Time. Very simple equation that can be applied to anything with a rate :)

So, amount of things done, divided by the amount of hours.

perHour := (thingsDone/(timeInMs * 3600 * 1000));

HarryJames

2011-05-09 21:08:02

http://villavu.com/forum/showpost.php?p=800162&postcount=2

Edit - double ninja'd. Silly iPod touch making mw really slow at doing anything!