Example #1
0
        public TimeScopeWindows(TimeScope t)
        {
#if PWindow
            mTime = t;
            mTime.Begin();
#endif
        }
Example #2
0
        public static TimeScope GetTimeScope(string name, TimeScope.EProfileFlag flags = TimeScope.EProfileFlag.FlagsAll, bool createWhenNotFound = true)
        {
            TimeScope counter;

            if (Instance.mCounters.TryGetValue(name, out counter))
            {
                return(counter);
            }
            else if (createWhenNotFound || SDK_v3dSampMgr_PureFindSamp(Instance.CoreObject, name).GetPointer() != IntPtr.Zero)
            {
                counter = new TimeScope(SDK_v3dSampMgr_FindSamp(Instance.CoreObject, name), flags);
                Instance.mCounters[name] = counter;
                return(counter);
            }
            return(null);
        }
Example #3
0
 public TimeScopeHelper(TimeScope t)
 {
     mTime = t;
     mTime.Begin();
 }