aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/TImeCheck.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/brysonsteck/Resurrection/TImeCheck.java')
-rw-r--r--src/net/brysonsteck/Resurrection/TImeCheck.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/net/brysonsteck/Resurrection/TImeCheck.java b/src/net/brysonsteck/Resurrection/TImeCheck.java
new file mode 100644
index 0000000..a7ea06c
--- /dev/null
+++ b/src/net/brysonsteck/Resurrection/TImeCheck.java
@@ -0,0 +1,20 @@
+package net.brysonsteck.Resurrection;
+
+import java.util.concurrent.TimeUnit;
+
+class TimeCheck {
+ long millis;
+
+ public TimeCheck(long millis) {
+ this.millis = millis;
+ }
+
+ public String formatTime() {
+ String formattedTime = String.format("%d hrs, %d min, %d sec",
+ TimeUnit.MILLISECONDS.toHours(millis),
+ TimeUnit.MILLISECONDS.toMinutes(millis),
+ TimeUnit.MILLISECONDS.toSeconds(millis) -
+ TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)));
+ return formattedTime;
+ }
+}