Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save e-tverdokhleb/4b4c2948aba79d248a11 to your computer and use it in GitHub Desktop.
Save e-tverdokhleb/4b4c2948aba79d248a11 to your computer and use it in GitHub Desktop.
public class main {
public static void main(String[] args) {
long millis = System.currentTimeMillis();
System.out.println(millis/(24*60*60*1000L) +
": " + millis/(60*60*1000L) +
": " + millis/(60*1000L) +
": " + millis/(1000L));
}
}
@liuiv15
Copy link

liuiv15 commented Nov 10, 2015

Ваш вывод: 16749: 401987: 24119221: 1447153311.
дни посчитаны правильно, а вот часы, минуты и секунды нет.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment