Here you can find the source of timeToTicks(Long time)
public static Long timeToTicks(Long time)
//package com.java2s; //License from project: Open Source License public class Main { public static Long timeToTicks(Long time) { //1000 ms = 20 ticks return Math.max(1, (time / 50)); }//from w ww . j ava 2 s .c o m }