/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.System
 */
package com.google.code.microlog4android;

class StopWatch {
    private long currentTime;
    private long startTime;
    private boolean started;
    private long stopTime;

    StopWatch() {
    }

    public long getCurrentTime() {
        StopWatch stopWatch = this;
        synchronized (stopWatch) {
            if (this.started) {
                this.currentTime = System.currentTimeMillis() - this.startTime;
            }
            long l = this.currentTime;
            return l;
        }
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    public void reset() {
        StopWatch stopWatch = this;
        synchronized (stopWatch) {
            this.startTime = this.started ? System.currentTimeMillis() : 0;
            this.stopTime = 0;
            this.currentTime = 0;
            return;
        }
    }

    public void start() {
        StopWatch stopWatch = this;
        synchronized (stopWatch) {
            this.startTime = System.currentTimeMillis();
            this.started = true;
            return;
        }
    }

    public long stop() {
        StopWatch stopWatch = this;
        synchronized (stopWatch) {
            this.stopTime = System.currentTimeMillis();
            this.currentTime = this.stopTime - this.startTime;
            this.started = false;
            long l = this.currentTime;
            return l;
        }
    }

    public String toString() {
        return String.valueOf((long)this.getCurrentTime());
    }
}

