aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/TimeCheck.java
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-06 17:48:46 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-06 17:48:46 -0600
commit0f89320996551ca6b5584be55b230f0511a5ad2c (patch)
tree8baef46923150692a2147823753cea5bccfb5185 /src/net/brysonsteck/Resurrection/TimeCheck.java
parent65033eee492e0016f88de2d765701bdb854ce330 (diff)
downloadresurrection-0f89320996551ca6b5584be55b230f0511a5ad2c.tar
resurrection-0f89320996551ca6b5584be55b230f0511a5ad2c.tar.gz
resurrection-0f89320996551ca6b5584be55b230f0511a5ad2c.tar.bz2
finishing the appearance of being dead
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;
+ }
+}