Java Hour getHour()

Here you can find the source of getHour()

Description

get Hour

License

Open Source License

Declaration

public static double getHour() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {
    private static long timer = 0;
    private static DecimalFormat formatter = new DecimalFormat("#.##");

    public static double getHour() {
        return format(getMinute() / 60.0);
    }//from  w  w  w. jav  a2s  .  co m

    private static Double format(double val) {
        return Double.parseDouble(formatter.format(val));
    }

    public static double getMinute() {
        return format(getSecond() / 60.0);
    }

    public static double getSecond() {
        return format((double) getMili() / 1000.0);
    }

    public static long getMili() {
        return timer / 1000000;
    }
}

Related

  1. getHexString(byte[] raw)
  2. getHour()
  3. getHour()
  4. getHour()
  5. getHour()
  6. getHour()
  7. getHour()
  8. getHour()
  9. getHour()