On Saturday, 17 August 2024 at 19:54:07 UTC, Richard (Rikki) Andrew Cattermole wrote:

https://dlang.org/phobos/core_thread_osthread.html#.Thread.sleep

Worth noting is that sleeping is not equivalent to performing work. It's the exact opposite, the lack of work.


Thanks Rikki. Actually, I was checked `core.thread` page. But at the top, after a speedy search, unfprtunately, I couldn't find anything. Now, I can see that beneath first second `Jump to` section, there is a `sleep`.

If you want to simulate work being done, use a loop with a stop watch to determine how much time has progressed.

Point noted. Thanks!



  • Re: How to find ... monkyyy via Digitalmars-d-learn
    • Re: How to ... Bruce via Digitalmars-d-learn
    • Re: How to ... Ron Tarrant via Digitalmars-d-learn
    • Re: How to ... Renato Athaydes via Digitalmars-d-learn
    • Re: How to ... Lance Bachmeier via Digitalmars-d-learn
    • Re: How to ... Steven Schveighoffer via Digitalmars-d-learn
      • Re: How... Vinod K Chandran via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... Vinod K Chandran via Digitalmars-d-learn
        • Re:... IchorDev via Digitalmars-d-learn
          • ... Vinod K Chandran via Digitalmars-d-learn
      • Re: How... Ron Tarrant via Digitalmars-d-learn
        • Re:... Renato Athaydes via Digitalmars-d-learn
      • Re: How... Andy Valencia via Digitalmars-d-learn
        • Re:... IchorDev via Digitalmars-d-learn
          • ... Andy Valencia via Digitalmars-d-learn
            • ... IchorDev via Digitalmars-d-learn

Reply via email to