Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 07, 2007 wait? sleep? | ||||
---|---|---|---|---|
| ||||
How do we wait or sleep for a specific amount of time in a thread? say 527 milliseconds? we use to have a static sleep on the std.thread didn't we? Ant |
January 07, 2007 Re: wait? sleep? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote:
> How do we wait or sleep for a specific amount of time in a thread?
> say 527 milliseconds?
>
> we use to have a static sleep on the std.thread didn't we?
>
>
> Ant
Afaics, msleep from std.c.time will do the trick
|
January 07, 2007 Re: wait? sleep? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote:
> How do we wait or sleep for a specific amount of time in a thread?
> say 527 milliseconds?
>
> we use to have a static sleep on the std.thread didn't we?
It's never been there, as far as I know.
Sean
|
January 07, 2007 Re: wait? sleep? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tom S | Tom S wrote:
> Ant wrote:
>> How do we wait or sleep for a specific amount of time in a thread?
>> say 527 milliseconds?
>>
>> we use to have a static sleep on the std.thread didn't we?
>>
>>
>> Ant
>
> Afaics, msleep from std.c.time will do the trick
Thank you that's it.
my system (linux ubuntu 6.10) didn't find msleep but is good for usleep.
Sean, probably I remember sleep from std.c.time and looking for it on thread (should have grep phobos source tree...)
thanks,
Ant
|
Copyright © 1999-2021 by the D Language Foundation