minor changes on llgettime

This commit is contained in:
UbitUmarov
2024-11-29 21:23:10 +00:00
parent 4b993d2379
commit 5aa37e74eb
4 changed files with 12 additions and 12 deletions

View File

@@ -78,14 +78,14 @@ namespace OpenSim.Region.ScriptEngine.Yengine
inst.Die();
}
public void SetLSLTimer(double time)
public void SetLSLTimerMS(double timeMS)
{
m_timer = time;
m_timer = 0.001 * timeMS;
}
public double getLSLTimer()
public double getLSLTimerMS()
{
return(m_timer);
return m_timer * 1000.0;
}
/**

View File

@@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
if(m_XMRLSLApi is not null)
{
double scriptTime = Util.GetTimeStampMS() - m_XMRLSLApi.getLSLTimer();
double scriptTime = Util.GetTimeStampMS() - m_XMRLSLApi.getLSLTimerMS();
XmlElement scriptTimeN = doc.CreateElement("", "scrpTime", "");
scriptTimeN.AppendChild(doc.CreateTextNode(scriptTime.ToString()));
scriptStateN.AppendChild(scriptTimeN);

View File

@@ -514,7 +514,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
XmlElement scpttimeN = (XmlElement)scriptStateN.SelectSingleNode("scrpTime");
if (scpttimeN != null && Double.TryParse(scpttimeN.InnerText, out double t))
{
m_XMRLSLApi.SetLSLTimer(Util.GetTimeStampMS() - t);
m_XMRLSLApi.SetLSLTimerMS(Util.GetTimeStampMS() - t);
}
}