doSleep() private method

private doSleep ( Random random, int length ) : void
random System.Random
length int
return void
Exemplo n.º 1
0
 public override void WriteByte(byte b)
 {
     if (numWrote >= IO_SLEEP_THRESHOLD)
     {
         outerInstance.doSleep(rand, 0);
         numWrote = 0;
     }
     ++numWrote;
     io.WriteByte(b);
 }
Exemplo n.º 2
0
 public override byte ReadByte()
 {
     if (numRead >= IO_SLEEP_THRESHOLD)
     {
         outerInstance.doSleep(rand, 0);
         numRead = 0;
     }
     ++numRead;
     return(ii.ReadByte());
 }