mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Improved calculation of Script Execution TimeStarted
1. Use a Stopwatch (a high-resolution timer) 2. Whenever we start a new measurement period, zero out the total execution time (previously it just kept accumulating) 3. Changed the measurement period from 30 minutes to 30 seconds. This is much more useful in the "Top Scripts" dialog, as it shows currently active scripts
This commit is contained in:
@@ -2384,7 +2384,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
|
||||
private float CalculateAdjustedExectionTime(IScriptInstance si, long tickNow)
|
||||
{
|
||||
long ticksElapsed = tickNow - si.MeasurementPeriodTickStart;
|
||||
long ticksElapsed = Util.EnvironmentTickCountSubtract((int)tickNow, (int)si.MeasurementPeriodTickStart);
|
||||
|
||||
// Avoid divide by zero
|
||||
if (ticksElapsed == 0)
|
||||
|
||||
Reference in New Issue
Block a user