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