Beispiel #1
0
        public Stopwatch() {
            this._start = InstrumentationUtils.now();
            this._currentSample = 0;
            float delta = 0f;

            this._laps = new float[InstrumentationUtils.kMaxSamples];
            for (int i = 0; i < this._laps.Length; i++) {
                this._laps[i] = delta;
            }
        }
Beispiel #2
0
 public void stop()
 {
     this._laps[this._currentSample] = InstrumentationUtils.now() - this._start;
 }
Beispiel #3
0
 public void start()
 {
     this._start         = InstrumentationUtils.now();
     this._currentSample = (this._currentSample + 1) % InstrumentationUtils.kMaxSamples;
 }