All pastes #95339 Raw Edit

Mine

public text v1 · immutable
#95339 ·published 2006-07-21 22:42 UTC
rendered paste body
  if( _ClipBandwidth && start + TimeSpan.FromSeconds( 1.0 ) < DateTime.Now )
                {
                    reset = true;
                }
                else if( _ClipBandwidth && _MaxBandwidth == 0 )
                {
                    while( _MaxBandwidth == 0 )
                    {
                        Thread.Sleep( 500 );
                    }
                    reset = true;
                }
                else if( _ClipBandwidth && sent > _MaxBandwidth )
                {
                    int toSleep = 1000 - ( DateTime.Now.Millisecond - start.Millisecond );
                    Thread.Sleep( toSleep );
                    reset = true;
                }

                if( reset )
                {
                    sent = 0;
                    start = DateTime.Now;
                }