Blockland Forums > Modification Help

Benchmarking Script Efficiency?

Pages: (1/3) > >>

CityRPG:

I'm using the function getRealTime() to compare start and end times of a script to figure out where things are slowing down, but I'm getting odd results like -4 and randomly skipping between almost nothing (between -4 ~ 6ms) and 16ms every second or so.

Does anyone have a better way to calculate execution time of functions?

Nexus:

I would go about it with a 0ms schedule if all else fails

otto-san:

why not getSimTime()?

CityRPG:


--- Quote from: otto-san on February 09, 2012, 09:41:42 PM ---why not getSimTime()?

--- End quote ---
because getSimTime has no time added when the engine is busy.

Scout31:

So, you have something like this currently?

--- Code: ---function asdf()
{
     %start = getRealTime();
     //stuff
     echo(getRealTime()-%start);
}
--- End code ---


Pages: (1/3) > >>

Go to full version