Ejemplo n.º 1
0
            private void AddTiming(Func <Field> field)
            {
                var timing = new HitTiming {
                    Field = field
                };

                _timings.Add(timing);

                _stopwatch = Stopwatch.StartNew();

                timing.Name     = _resolver.Resolve(field());
                timing.FirstHit = _stopwatch.Elapsed.TotalMilliseconds;

                _stopwatch.Restart();

                _resolver.Resolve(field());
                timing.CachedHit = _stopwatch.Elapsed.TotalMilliseconds;

                _stopwatch.Stop();
            }
			private void AddTiming(Func<Field> field)
			{
				var timing = new HitTiming { Field = field };
				_timings.Add(timing);

				_stopwatch = Stopwatch.StartNew();

				timing.Name = _resolver.Resolve(field());
				timing.FirstHit = _stopwatch.Elapsed.TotalMilliseconds;

				_stopwatch.Restart();

				_resolver.Resolve(field());
				timing.CachedHit = _stopwatch.Elapsed.TotalMilliseconds;

				_stopwatch.Stop();
			}
Ejemplo n.º 3
0
 /// <summary>
 /// Event called on current map change.
 /// </summary>
 private void OnMapChange(IPlayableMap map)
 {
     hitTiming = map == null ? null : ModeService.CreateTiming();
 }