List of utility methods to do Micro Second Convert
void | delayMicroseconds(int microseconds) Delay in microseconds. try { Thread.sleep(0, microseconds * 1000); } catch (InterruptedException e) { |
double | microseconds2seconds(double us) microsecondsseconds return 0.000001 * us;
|
long | microsecondsToFrames(double frameRate, long microseconds) microseconds To Frames return (long) ((microseconds / 1000) / ((1d / frameRate) * 1000)); |
String | microsecondsToReadableTime(long microseconds) microseconds To Readable Time long l_seconds = microseconds / MICROSECONDS_PER_SECOND; int hours = (int) Math.floor(l_seconds / 3600 % 60); int minutes = (int) Math.floor(l_seconds / 60 % 60); int seconds = (int) (l_seconds % 60); return td(hours) + ":" + td(minutes) + ":" + td(seconds); |