aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorUbitUmarov2017-07-13 20:21:18 +0100
committerUbitUmarov2017-07-13 20:21:18 +0100
commit8b16131206818329e973faec3a9861fca37f0073 (patch)
treed2fa5fde6441f83e2396bd5893f9c6fd368f5cdd /OpenSim/Framework
parentupdate libomv fixing EnUsCulture (diff)
downloadopensim-SC-8b16131206818329e973faec3a9861fca37f0073.zip
opensim-SC-8b16131206818329e973faec3a9861fca37f0073.tar.gz
opensim-SC-8b16131206818329e973faec3a9861fca37f0073.tar.bz2
opensim-SC-8b16131206818329e973faec3a9861fca37f0073.tar.xz
add Util.GetTimeStamp() that returns the stamp in seconds; use it on ubOde; separed land collsions dispatch from the others...
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index ed24452..a42dcc6 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -156,12 +156,14 @@ namespace OpenSim.Framework
156 public static readonly int MAX_THREADPOOL_LEVEL = 3; 156 public static readonly int MAX_THREADPOOL_LEVEL = 3;
157 157
158 public static double TimeStampClockPeriodMS; 158 public static double TimeStampClockPeriodMS;
159 public static double TimeStampClockPeriod;
159 160
160 static Util() 161 static Util()
161 { 162 {
162 LogThreadPool = 0; 163 LogThreadPool = 0;
163 LogOverloads = true; 164 LogOverloads = true;
164 TimeStampClockPeriodMS = 1000.0D / (double)Stopwatch.Frequency; 165 TimeStampClockPeriod = 1.0D/ (double)Stopwatch.Frequency;
166 TimeStampClockPeriodMS = 1e3 * TimeStampClockPeriod;
165 m_log.InfoFormat("[UTIL] TimeStamp clock with period of {0}ms", Math.Round(TimeStampClockPeriodMS,6,MidpointRounding.AwayFromZero)); 167 m_log.InfoFormat("[UTIL] TimeStamp clock with period of {0}ms", Math.Round(TimeStampClockPeriodMS,6,MidpointRounding.AwayFromZero));
166 } 168 }
167 169
@@ -3016,6 +3018,11 @@ namespace OpenSim.Framework
3016 3018
3017 // returns a timestamp in ms as double 3019 // returns a timestamp in ms as double
3018 // using the time resolution avaiable to StopWatch 3020 // using the time resolution avaiable to StopWatch
3021 public static double GetTimeStamp()
3022 {
3023 return (double)Stopwatch.GetTimestamp() * TimeStampClockPeriod;
3024 }
3025
3019 public static double GetTimeStampMS() 3026 public static double GetTimeStampMS()
3020 { 3027 {
3021 return (double)Stopwatch.GetTimestamp() * TimeStampClockPeriodMS; 3028 return (double)Stopwatch.GetTimestamp() * TimeStampClockPeriodMS;