Weird timing issue with Thread.sleep

Steven Schveighoffer schveiguy at yahoo.com
Wed Aug 3 11:35:46 PDT 2011


On Wed, 03 Aug 2011 13:42:34 -0400, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> That could be the reason. I'm testing on Windows.

Windows only supports millisecond resolution.

A valid solution to this is probably to have anything > 0 and < 1 ms sleep  
for at least 1ms.  Or maybe it can round up to the next ms.

For now, you can simply sleep for 1ms.

-Steve


More information about the Digitalmars-d-learn mailing list