Code example for TimeUnit

Methods: toSeconds

0
    public long getMillis() { 
        return millis(); 
    } 
 
    public long seconds() { 
        return timeUnit.toSeconds(duration);
    } 
 
    public long getSeconds() { 
        return seconds(); 
    } 
 
    public long minutes() { 
        return timeUnit.toMinutes(duration);
    } 
 
    public long getMinutes() { 
        return minutes(); 
    } 
 
Connect your IDE to all the code out there  Get Codota for Java