Beispiel #1
0
 public override void WriteByte(byte b)
 {
     if (numWrote >= IO_SLEEP_THRESHOLD)
     {
         outerInstance.DoSleep(rand, 0);
         numWrote = 0;
     }
     ++numWrote;
     io.WriteByte(b);
 }
Beispiel #2
0
 public override byte ReadByte()
 {
     if (numRead >= IO_SLEEP_THRESHOLD)
     {
         outerInstance.DoSleep(rand, 0);
         numRead = 0;
     }
     ++numRead;
     return(ii.ReadByte());
 }