Code example for Chronometer

Methods: getBase, setBase, start

0
    /** 
     * Starts a new level because it is paused during the victory or loss vibration pattern (to preserve time). 
     * Almost the same as resumeTimer() but also sets a new levelStartTimeLeft. 
     */ 
    public void startLevel() { 
        chronoTimer.setBase(getCurrentTime() - pauseChronoElapsed);
        chronoTimer.start();
        pauseChronoElapsed = 0;
        levelStartTimeLeft = startTime - (getCurrentTime() - chronoTimer.getBase());
    } 
 
 
    public void resumeTimer() { 
        chronoTimer.setBase(getCurrentTime() - pauseChronoElapsed);
        chronoTimer.start();
        pauseChronoElapsed = 0;
 
    } 
 
 
    /**