Java 获得 epoch 时间

使用下面的代码获取 epoch 时间。long epoch = System.currentTimeMillis()/1000;