Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,089 questions

40,774 answers

573 users

How to convert milliseconds to microseconds in Java

2 Answers

0 votes
import java.util.concurrent.TimeUnit;

public class MyClass {
    public static void main(String args[]) {
         long durationInMicroseconds = TimeUnit.MICROSECONDS.convert(1, TimeUnit.MILLISECONDS);
         System.out.println(durationInMicroseconds);
    }
}

/*
run:
  
1000
 
*/

 





answered May 31, 2018 by avibootz
edited May 31, 2018 by avibootz
0 votes
import java.util.concurrent.TimeUnit;

public class MyClass {
    public static void main(String args[]) {
         long milliseconds = 3;
         long durationInMicroseconds = milliseconds * 1000;
         System.out.println(durationInMicroseconds);
    }
}

/*
run:
  
3000
 
*/

 





answered May 31, 2018 by avibootz
edited May 31, 2018 by avibootz

Related questions

2 answers 101 views
1 answer 75 views
1 answer 73 views
1 answer 27 views
2 answers 87 views
...