4

This is kind of a strange question, but I need to create artificial lag to test how my game runs during lag spikes... I don't have the slightest clue of how to do it... I'd like to be able to turn the lag on/off if that's possible.

Sosumi
  • 759
  • 6
  • 20
  • other inputs on simulating a slow network: http://stackoverflow.com/questions/1094760/network-tools-that-simulate-slow-network-connection – Rolf Rander Jan 19 '12 at 09:50

1 Answers1

2

If you want to slow your code down, you could introduce blocking using the NSThread class method sleepForTimeInterval:.

To simulate a slow network connection, Craig Hockenberry wrote this blog post a while back.

gerry3
  • 21,420
  • 9
  • 66
  • 74