From 9ca70e029aed533a2cd702e4b21ed937f49b7aa8 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 14 Dec 2007 16:10:56 +0000 Subject: Again, thanks to Alondria for: adding llGetTime, llResetTime, and llGetAndResetTime. Also for fixing Rot/Vector Regex from being too greedy by removing bug in the LSL->C# converter that was causing the vector and rotation parser. --- .../DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 40c6533..8563694 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -69,6 +69,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler //MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); } + private DateTime m_timer = DateTime.Now; private string m_state = "default"; public string State() @@ -843,19 +844,20 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public double llGetTime() { - NotImplemented("llGetTime"); - return 0; + TimeSpan ScriptTime = DateTime.Now - m_timer; + return (double)(ScriptTime.TotalMilliseconds / 1000); } public void llResetTime() { - NotImplemented("llResetTime"); + m_timer = DateTime.Now; } public double llGetAndResetTime() { - NotImplemented("llGetAndResetTime"); - return 0; + TimeSpan ScriptTime = DateTime.Now - m_timer; + m_timer = DateTime.Now; + return (double)(ScriptTime.TotalMilliseconds / 1000); } public void llSound() -- cgit v1.1