private static long calculateUs(long time, long timescale) {
        return (long)(((double)time / timescale) * 1000000d);
    }
Converts a time/timescale pair to microseconds.
MediaPlayer-DASH/src/main/java/net/protyposis/android/mediaplayer/dash/DashParser.java