Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Can we use Thread.sleep() method for real-time processing in Java?

Pragya Keshap answered on February 4, 2023 Popularity 8/10 Helpfulness 3/10

Contents


More Related Answers

  • java sleep in code
  • javascript sleep thread
  • sleep for milliseconds in java
  • sleep() java
  • java swing timer sleep
  • thread sleep daret
  • swift thread.sleep
  • java sleep 1 second
  • thread sleep vb
  • java thread class sleep
  • What are daemon threads in java?
  • what happens when you call Thread.sleep()
  • thread java timer
  • Thread Pools in Java
  • thread.sleep
  • thread sleep() vs wait()
  • thread priorities in java
  • Explain purpose of sleep() method in java?
  • Thread.sleep(50);
  • Python sleep() in a multithreaded program
  • What is sleep() method
  • python timer sleep better big sleep or for loop?
  • thread sleep() vs wait()
  • Difference between sleep() and wait() in Java
  • Example For Sleep Method:
  • Java program to demonstrate the difference between wait and sleep
  • Java Program to illustrate sleep method
  • Difference Between sleep and yield Method in Java
  • Can we start a thread two times in Java?

  • Can we use Thread.sleep() method for real-time processing in Java?

    0

    Java does not guarantee that Thread.sleep() will cause the thread to

    sleep for exactly N number of milliseconds. Sometime the thread

    can sleep for than N number of milliseconds.

    In real-time processing we need precise time period for which a

    thread should run or sleep.

    Therefore the invocation of Thread.sleep() method is not

    recommended for use in real-time processing.

    https://www.digitalocean.com/community/tutorials/thread-sleep-java

    Popularity 8/10 Helpfulness 3/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 04 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.