diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-06-06 17:48:46 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-06-06 17:48:46 -0600 |
commit | 0f89320996551ca6b5584be55b230f0511a5ad2c (patch) | |
tree | 8baef46923150692a2147823753cea5bccfb5185 /src/net/brysonsteck/Resurrection/TimeCheck.java | |
parent | 65033eee492e0016f88de2d765701bdb854ce330 (diff) | |
download | resurrection-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.java | 20 |
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; + } +} |