title: Double Timeunit Conversion
body: <p>TimeUnit.toSeconds works well when the result is > 1. However, because we're dealing with longs, if the result is between 0 and 1 exclusive, we get 0 instead. Is the a java SDK function that handles double conversions for us?</p>
  
  <p>I understand that I can perform these conversion myself by multiplying or dividing by the appropriate double. However, it is error prone and does not read well. My preference is to use an existing function from the Java SDK, similar to Java's TimeUnit.</p>
  
  <p>Minimal example demonstrating my situation:</p>
  
  <pre><code>import java.util.*;
  import java.util.concurrent.*;
  public class Main {
      public static void main(String[] args) {
          System.out.println(TimeUnit.MILLISECONDS.toSeconds(1));
      }
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>0
  </code></pre>
  
  <p>I want a function that handles doubles that returns 0.001</p>