title: how do I shorten this
body: <p>is there any way to shorten this code?
  In the code, times of microseconds are converted into minutes and seconds. For example 305862000 ms = 05:05 (5 min : 5 sec).</p>
  
  <pre><code>public static String timeFormatter (long microtime) {
      String time = null, timemin = null, timesec = null;
      long min = 0;
      long sec = 0;
  
      // check if time is negative
      if (microtime &lt; 0) {
          throw new RuntimeException("Negativ time value provided");
      } else {
          min = (long) (microtime/(Math.pow((double) 10,(double) 6))/60);
          if (min &lt; 10) {
              timemin = "0" + min;
          // check if time is too long
          } else if (min &gt; 99) {
              throw new RuntimeException("Time value exceeds allowed format");
          } else {
              timemin = min + "";
          }
          microtime = (long) (microtime - min*60*Math.pow((double) 10, (double) 6));
          sec = (long) (microtime/Math.pow(10, 6));
          if (sec &lt; 10) {
              timesec = "0" + sec;
          } else {
              timesec = sec + "";
          }
          time = timemin + ":" + timesec;
      }
      return time;
  }
  </code></pre>