aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/IScene.cs2
-rw-r--r--OpenSim/Framework/Util.cs18
2 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 27b3d47..86d63f8 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -91,6 +91,8 @@ namespace OpenSim.Framework
91 /// </exception> 91 /// </exception>
92 bool PresenceChildStatus(UUID agentId); 92 bool PresenceChildStatus(UUID agentId);
93 93
94 bool TryGetAvatar(UUID agentID, out object scenePresence);
95
94 T RequestModuleInterface<T>(); 96 T RequestModuleInterface<T>();
95 T[] RequestModuleInterfaces<T>(); 97 T[] RequestModuleInterfaces<T>();
96 98
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 10af925..64f6118 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using System.Diagnostics;
32using System.Globalization; 33using System.Globalization;
33using System.IO; 34using System.IO;
34using System.IO.Compression; 35using System.IO.Compression;
@@ -1443,6 +1444,7 @@ namespace OpenSim.Framework
1443 } 1444 }
1444 1445
1445 #endregion FireAndForget Threading Pattern 1446 #endregion FireAndForget Threading Pattern
1447
1446 /// <summary> 1448 /// <summary>
1447 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive 1449 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
1448 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap 1450 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
@@ -1467,5 +1469,21 @@ namespace OpenSim.Framework
1467 Int32 diff = EnvironmentTickCount() - prevValue; 1469 Int32 diff = EnvironmentTickCount() - prevValue;
1468 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); 1470 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
1469 } 1471 }
1472
1473 /// <summary>
1474 /// Prints the call stack at any given point. Useful for debugging.
1475 /// </summary>
1476 public static void PrintCallStack()
1477 {
1478 StackTrace stackTrace = new StackTrace(); // get call stack
1479 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
1480
1481 // write call stack method names
1482 foreach (StackFrame stackFrame in stackFrames)
1483 {
1484 m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name
1485 }
1486 }
1487
1470 } 1488 }
1471} 1489}