Here you can find the source of millisToCycles(double millis, double hz)
public static long millisToCycles(double millis, double hz)
//package com.java2s; public class Main { public static long millisToCycles(double millis, double hz) { return (long) (hz * millis / 1000); }/* ww w.j a va2s . com*/ }