diff options
author | UbitUmarov | 2016-11-22 05:18:06 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-22 05:18:06 +0000 |
commit | 4e64445c39c3de1941e071ff32d06702a3440d5d (patch) | |
tree | d22dd941e1bb849b525b9d31c9eb3b07f96047bc | |
parent | change asset description max size (diff) | |
download | opensim-SC_OLD-4e64445c39c3de1941e071ff32d06702a3440d5d.zip opensim-SC_OLD-4e64445c39c3de1941e071ff32d06702a3440d5d.tar.gz opensim-SC_OLD-4e64445c39c3de1941e071ff32d06702a3440d5d.tar.bz2 opensim-SC_OLD-4e64445c39c3de1941e071ff32d06702a3440d5d.tar.xz |
replace datetime.now on just timming by faster utcnow
4 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c349369..09f0b19 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5454,6 +5454,7 @@ Label_GroupsDone: | |||
5454 | 5454 | ||
5455 | public void CleanTempObjects() | 5455 | public void CleanTempObjects() |
5456 | { | 5456 | { |
5457 | DateTime now = DateTime.UtcNow; | ||
5457 | EntityBase[] entities = GetEntities(); | 5458 | EntityBase[] entities = GetEntities(); |
5458 | foreach (EntityBase obj in entities) | 5459 | foreach (EntityBase obj in entities) |
5459 | { | 5460 | { |
@@ -5465,7 +5466,7 @@ Label_GroupsDone: | |||
5465 | { | 5466 | { |
5466 | if ((grp.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) | 5467 | if ((grp.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) |
5467 | { | 5468 | { |
5468 | if (grp.GetSittingAvatarsCount() == 0 && grp.RootPart.Expires <= DateTime.Now) | 5469 | if (grp.GetSittingAvatarsCount() == 0 && grp.RootPart.Expires <= now) |
5469 | DeleteSceneObject(grp, false); | 5470 | DeleteSceneObject(grp, false); |
5470 | } | 5471 | } |
5471 | } | 5472 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e643db7..0cd738d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -153,9 +153,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
153 | { | 153 | { |
154 | m_scene.SceneGraph.FireChangeBackup(this); | 154 | m_scene.SceneGraph.FireChangeBackup(this); |
155 | } | 155 | } |
156 | timeLastChanged = DateTime.Now.Ticks; | 156 | timeLastChanged = DateTime.UtcNow.Ticks; |
157 | if (!m_hasGroupChanged) | 157 | if (!m_hasGroupChanged) |
158 | timeFirstChanged = DateTime.Now.Ticks; | 158 | timeFirstChanged = DateTime.UtcNow.Ticks; |
159 | if (m_rootPart != null && m_rootPart.UUID != null && m_scene != null) | 159 | if (m_rootPart != null && m_rootPart.UUID != null && m_scene != null) |
160 | { | 160 | { |
161 | /* | 161 | /* |
@@ -233,7 +233,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
233 | m_minPersistTime = m_scene.m_dontPersistBefore; | 233 | m_minPersistTime = m_scene.m_dontPersistBefore; |
234 | } | 234 | } |
235 | 235 | ||
236 | long currentTime = DateTime.Now.Ticks; | 236 | long currentTime = DateTime.UtcNow.Ticks; |
237 | 237 | ||
238 | if (timeLastChanged == 0) timeLastChanged = currentTime; | 238 | if (timeLastChanged == 0) timeLastChanged = currentTime; |
239 | if (timeFirstChanged == 0) timeFirstChanged = currentTime; | 239 | if (timeFirstChanged == 0) timeFirstChanged = currentTime; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9d1dca2..3a06e7d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -185,8 +185,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
185 | return | 185 | return |
186 | !(SitTargetPosition == Vector3.Zero | 186 | !(SitTargetPosition == Vector3.Zero |
187 | && (SitTargetOrientation == Quaternion.Identity // Valid Zero Rotation quaternion | 187 | && (SitTargetOrientation == Quaternion.Identity // Valid Zero Rotation quaternion |
188 | || SitTargetOrientation.X == 0f && SitTargetOrientation.Y == 0f && SitTargetOrientation.Z == 1f && SitTargetOrientation.W == 0f // W-Z Mapping was invalid at one point | 188 | || (SitTargetOrientation.W == 0f && SitTargetOrientation.X == 0f && SitTargetOrientation.Y == 0f && SitTargetOrientation.Z == 0f ))); // Invalid Quaternion |
189 | || SitTargetOrientation.X == 0f && SitTargetOrientation.Y == 0f && SitTargetOrientation.Z == 0f && SitTargetOrientation.W == 0f)); // Invalid Quaternion | ||
190 | } | 189 | } |
191 | } | 190 | } |
192 | 191 | ||
@@ -1909,7 +1908,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1909 | 1908 | ||
1910 | public void ResetExpire() | 1909 | public void ResetExpire() |
1911 | { | 1910 | { |
1912 | Expires = DateTime.Now + new TimeSpan(600000000); | 1911 | Expires = DateTime.UtcNow + new TimeSpan(600000000); |
1913 | } | 1912 | } |
1914 | 1913 | ||
1915 | public void AddFlag(PrimFlags flag) | 1914 | public void AddFlag(PrimFlags flag) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index d725907..7129c8a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -880,7 +880,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
880 | try | 880 | try |
881 | { | 881 | { |
882 | m_CurrentEvent = data.EventName; | 882 | m_CurrentEvent = data.EventName; |
883 | m_EventStart = DateTime.Now; | 883 | m_EventStart = DateTime.UtcNow; |
884 | m_InEvent = true; | 884 | m_InEvent = true; |
885 | 885 | ||
886 | try | 886 | try |
@@ -1033,7 +1033,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
1033 | if (!m_InEvent) | 1033 | if (!m_InEvent) |
1034 | return 0; | 1034 | return 0; |
1035 | 1035 | ||
1036 | return (DateTime.Now - m_EventStart).Seconds; | 1036 | return (DateTime.UtcNow - m_EventStart).Seconds; |
1037 | } | 1037 | } |
1038 | 1038 | ||
1039 | public void ResetScript(int timeout) | 1039 | public void ResetScript(int timeout) |