Here you can find the source of timeToTimestamp(long currentTimeMsecs)
public static int timeToTimestamp(long currentTimeMsecs)
//package com.java2s; public class Main { public static int timeToTimestamp(long currentTimeMsecs) { int time = (int) (currentTimeMsecs >> 8); // divide by 256, to quarter-seconds if (time < 0) { time &= 0x7FFFFFFF;/*w ww .j ava 2 s .c om*/ } return time; } }