Refactored DurationUtils to include DAYS field, and created string resources with days

This commit is contained in:
Phillip Hsu
2016-06-10 20:37:45 -07:00
parent 8d23d8f0b2
commit 0bcbd6b421
4 changed files with 212 additions and 64 deletions
@@ -0,0 +1,23 @@
package com.philliphsu.clock2;
import com.philliphsu.clock2.util.DurationUtils;
import org.junit.Test;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
/**
* Created by Phillip Hsu on 6/10/2016.
*/
public class DurationUtilsTest {
@Test
public void testBreakdown() {
long duration = TimeUnit.HOURS.toMillis(45)
+ TimeUnit.MINUTES.toMillis(97);
long[] l = DurationUtils.breakdown(duration);
System.out.println(Arrays.toString(l));
}
}