Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 public static TimeScope GetTimeScope(Type type, string method, TimeScope.EProfileFlag flags = TimeScope.EProfileFlag.FlagsAll)
 {
     return(GetTimeScope(type.FullName + "." + method));
 }