get epoch milliseconds of a time java code example Example: get epoch time in java long epochTime=System.currentTimeMillis();