From 08e509978d81cb3451c205ed59648e3f5da91344 Mon Sep 17 00:00:00 2001 From: Talun Date: Tue, 10 Apr 2012 21:25:05 +0100 Subject: Mantis 55025 Implement script time. Signed-off-by: nebadon --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8863df1..641d742 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3438,6 +3438,25 @@ namespace OpenSim.Region.Framework.Scenes } /// + /// A float the value is a representative execution time in milliseconds of all scripts in all attachments. + /// + public float ScriptExecutionTime() + { + float time = 0.0f; + lock (m_attachments) + { + foreach (SceneObjectGroup gobj in m_attachments) + { + if (gobj != null) + { + time += gobj.ScriptExecutionTime(); + } + } + } + return time; + } + + /// /// Returns the total count of running scripts in all parts. /// public int RunningScriptCount() -- cgit v1.1