Java TimeUnit Usage getMinutes(final long milliseconds)

Here you can find the source of getMinutes(final long milliseconds)

Description

get Minutes

License

Apache License

Declaration

public static int getMinutes(final long milliseconds) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.concurrent.TimeUnit;

public class Main {
    public static final long MINUTE = TimeUnit.MINUTES.toMillis(1);
    public static final long HOUR = TimeUnit.HOURS.toMillis(1);

    public static int getMinutes(final long milliseconds) {
        return (int) (milliseconds % HOUR / MINUTE);
    }//from  w w  w .ja  va  2s . c om
}

Related

  1. getInsertionEndIndex(List list, Delayed key)
  2. getInStringSeconds(String pollInterval)
  3. getLastSlotDate(final int occurrences, final int periodicity, final long firstSlotDate, final int firstSlotDay, final String selectedDays)
  4. getLongFromQueue(BlockingQueue queue)
  5. getMailServerProps(String toAddress, int smtpPort, int imapPort)
  6. getMinutesBetweenDates(Date begin_date, Date end_date)
  7. getMinutesBetweenDates(Date firstDate, Date secondDate)
  8. getNormalizedIntervalStartTimestamp(long intervalLengthMillis, long currentTimestamp)
  9. getNowInSeconds()