aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 8033c90..8a744c3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -220,8 +220,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
220 220
221 private EventWaitHandle m_coopSleepHandle; 221 private EventWaitHandle m_coopSleepHandle;
222 222
223 private Stopwatch executionTimer = new Stopwatch();
224
225 public void ClearQueue() 223 public void ClearQueue()
226 { 224 {
227 m_TimerQueued = false; 225 m_TimerQueued = false;
@@ -293,7 +291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
293 foreach (string api in am.GetApis()) 291 foreach (string api in am.GetApis())
294 { 292 {
295 m_Apis[api] = am.CreateApi(api); 293 m_Apis[api] = am.CreateApi(api);
296 m_Apis[api].Initialize(Engine, Part, ScriptTask, m_coopSleepHandle, executionTimer); 294 m_Apis[api].Initialize(Engine, Part, ScriptTask, m_coopSleepHandle);
297 } 295 }
298 296
299 try 297 try
@@ -768,7 +766,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
768 if (Suspended) 766 if (Suspended)
769 return 0; 767 return 0;
770 768
771 executionTimer.Restart(); 769 Stopwatch timer = new Stopwatch();
770 timer.Start();
772 771
773 try 772 try
774 { 773 {
@@ -776,9 +775,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
776 } 775 }
777 finally 776 finally
778 { 777 {
779 executionTimer.Stop(); 778 timer.Stop();
780 ExecutionTime.AddSample(executionTimer); 779 ExecutionTime.AddSample(timer);
781 Part.ParentGroup.Scene.AddScriptExecutionTime(executionTimer.ElapsedTicks); 780 Part.ParentGroup.Scene.AddScriptExecutionTime(timer.ElapsedTicks);
782 } 781 }
783 } 782 }
784 } 783 }