Skip to content

Instantly share code, notes, and snippets.

@edinak1
Created October 17, 2015 17:30
Show Gist options
  • Save edinak1/a0b17397b1cb3d5f201d to your computer and use it in GitHub Desktop.
Save edinak1/a0b17397b1cb3d5f201d to your computer and use it in GitHub Desktop.
package homeWork1;
public class DHMS {
public static void main(String[] args) {
long days =System.currentTimeMillis()/1000/60/60/24,
hours =System.currentTimeMillis()/1000/60/60%24,
minutes =System.currentTimeMillis()/1000/60%60,
seconds =System.currentTimeMillis()/1000%60;
System.out.println(days+":"+hours+":"+minutes+":"+seconds);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment