Thread.sleep (DMD 2.020)

Christopher Wright dhasenan at gmail.com
Sat Nov 1 17:50:47 PDT 2008


John C wrote:
> Sean Kelly Wrote:
> 
>> John C wrote:
>>> Win32's Sleep(50) seems to be the same as Thread.sleep(500_000). Is that right?
>> Yup.  There should probably be some sort of TimeSpan struct to help 
>> prevent these mistakes.
>>
>>
>> Aean
> 
> That's why I wrote Mango's TimeSpan way back when...

Unfortunately, at the moment, that would mean putting TimeSpan into 
druntime (dcore?), which probably isn't going to happen.

I hope that TimeSpan can make its way into a core part of Tango 
eventually. Socket, for instance, uses struct timeval directly -- if I 
recall correctly, client code has to construct timevals, and there's no 
constructor provided.



More information about the Digitalmars-d mailing list