From 8b16131206818329e973faec3a9861fca37f0073 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 13 Jul 2017 20:21:18 +0100 Subject: add Util.GetTimeStamp() that returns the stamp in seconds; use it on ubOde; separed land collsions dispatch from the others... --- OpenSim/Framework/Util.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') 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 public static readonly int MAX_THREADPOOL_LEVEL = 3; public static double TimeStampClockPeriodMS; + public static double TimeStampClockPeriod; static Util() { LogThreadPool = 0; LogOverloads = true; - TimeStampClockPeriodMS = 1000.0D / (double)Stopwatch.Frequency; + TimeStampClockPeriod = 1.0D/ (double)Stopwatch.Frequency; + TimeStampClockPeriodMS = 1e3 * TimeStampClockPeriod; m_log.InfoFormat("[UTIL] TimeStamp clock with period of {0}ms", Math.Round(TimeStampClockPeriodMS,6,MidpointRounding.AwayFromZero)); } @@ -3016,6 +3018,11 @@ namespace OpenSim.Framework // returns a timestamp in ms as double // using the time resolution avaiable to StopWatch + public static double GetTimeStamp() + { + return (double)Stopwatch.GetTimestamp() * TimeStampClockPeriod; + } + public static double GetTimeStampMS() { return (double)Stopwatch.GetTimestamp() * TimeStampClockPeriodMS; -- cgit v1.1