Code example for Chronometer

Methods: setBase, start

0
        levelStartTimeLeft = startTime - (getCurrentTime() - chronoTimer.getBase());
    } 
 
 
    public void resumeTimer() { 
        chronoTimer.setBase(getCurrentTime() - pauseChronoElapsed);
        chronoTimer.start();
        pauseChronoElapsed = 0;
 
    } 
 
 
    /** 
     * Called when the the user breaks the pick (loses the level). 
     */ 
    public void levelLost() { 
 
        pauseTimer(); 
 
    }