Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道有没有办法(通过java或php)来增加页面加载时间onload来模拟服务器的过载。
onload
我已经尝试过delayer()“功能”,但这实际上加载了页面。
delayer()
在您的 servlet 代码中尝试 Thread.sleep(long milliseconds)。从 Thread 类 javadoc:
使当前执行的线程休眠(暂时停止执行)指定的毫秒数,取决于系统计时器和调度程序的精度和准确性。
客户端(蟒蛇):
theta = math.sin(23/3) / 300 y = math.cos(23/11) / 20 data=struct.pack('<ff',theta,y) # pack with two float s.sendto(data, (ip, 50000))
服