How to find the right function in the Phobos library?

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Aug 17 19:54:07 UTC 2024


On 18/08/2024 7:49 AM, Vinod K Chandran wrote:
> On Saturday, 17 August 2024 at 17:31:53 UTC, Steven Schveighoffer wrote:
>>
>> Go to dlang.org, select dicumentation, then library reference.
>>
>> Pick any module, click on it
>>
>> In the upper right, switch the docs from stable to ddox
>>
>> Now you can use the search bar and it is interactive. Typing in 
>> indexOf found it right away.
>>
> 
> Steve, We need a better search system. For example, I needed something 
> like the `thread.sleep()` in .net today. All I want is a delay function 
> which simulate some work load in current thread. But sadly, it is 
> difficult to find.
> -kcvinker

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.

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



More information about the Digitalmars-d-learn mailing list