As the title, is there a way to get the Timer working under the threshold of a millisecond?
My question is similar the following one, but it is intended for Java:
Thread.Sleep for less than 1 millisecond
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to sleep,
Thread.sleephas 2 methods, one of which accepts nanoseconds. If you want to schedule a task, you can use aScheduledExecutorServicewhichschedulemethods can use nanoseconds too.As explained by @MarkoTopolnik, the result will most likely not be precise to the nanosecond.