diff options
author | Abyss777 <abyss@fox5.ru> | 2018-05-30 09:19:03 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-05-30 09:19:03 +0500 |
commit | 9c2830b50b667b188c844102dd9ed91fd487d386 (patch) | |
tree | d4a0cd8eb777c06dd1424e8cf955f8c07ad1f43f /src/org/traccar/helper | |
parent | 0e9f1f9bd0df2bc6771f3f5819eb6dbe8c3ce191 (diff) | |
download | trackermap-server-9c2830b50b667b188c844102dd9ed91fd487d386.tar.gz trackermap-server-9c2830b50b667b188c844102dd9ed91fd487d386.tar.bz2 trackermap-server-9c2830b50b667b188c844102dd9ed91fd487d386.zip |
Add converter from minutes to milliseconds
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r-- | src/org/traccar/helper/UnitsConverter.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/helper/UnitsConverter.java b/src/org/traccar/helper/UnitsConverter.java index 74f5a90e6..3dd435df4 100644 --- a/src/org/traccar/helper/UnitsConverter.java +++ b/src/org/traccar/helper/UnitsConverter.java @@ -24,6 +24,7 @@ public final class UnitsConverter { private static final double METERS_TO_FEET_RATIO = 0.3048; private static final double METERS_TO_MILE_RATIO = 1609.34; private static final long MILLISECONDS_TO_HOURS_RATIO = 3600000; + private static final long MILLISECONDS_TO_MINUTES_RATIO = 60000; private UnitsConverter() { } @@ -80,4 +81,8 @@ public final class UnitsConverter { return (long) (value * MILLISECONDS_TO_HOURS_RATIO); } + public static long msFromMinutes(long value) { + return value * MILLISECONDS_TO_MINUTES_RATIO; + } + } |