Esempio n. 1
0
		public static TimerProfile Acquire(string name) {
			if (BaseProfile.Profiling == false) {
				return null;
			}

			TimerProfile prof;
			if (mProfiles.TryGetValue(name, out prof) == false) {
				mProfiles.Add(name, prof = new TimerProfile(name));
			}

			return prof;
		}
Esempio n. 2
0
        public void Stop()
        {
            if (!mRunning)
            {
                return;
            }
            mRunning = false;
            TimerThread.RemoveTimer(this);

            TimerProfile prof = GetProfile();

            if (prof != null)
            {
                prof.Stopped++;
            }
        }
Esempio n. 3
0
        public static TimerProfile Acquire(string name)
        {
            if (BaseProfile.Profiling == false)
            {
                return(null);
            }

            TimerProfile prof;

            if (mProfiles.TryGetValue(name, out prof) == false)
            {
                mProfiles.Add(name, prof = new TimerProfile(name));
            }

            return(prof);
        }
Esempio n. 4
0
        public void Start()
        {
            if (mRunning)
            {
                return;
            }

            mRunning = true;
            TimerThread.AddTimer(this);

            TimerProfile prof = GetProfile();

            if (prof != null)
            {
                prof.Started++;
            }
        }