NightKn8
NightKn8

Reputation: 379

Java: increase page load time script

I want to know is there a way (by java or php) to increase page load time onload to simulate overload of the server.

I have tried delayer() "function" but this actualy loads the page.

Upvotes: 0

Views: 178

Answers (1)

hermansen
hermansen

Reputation: 156

Try Thread.sleep(long milliseconds) in your servlet code. From the Thread class javadoc:

Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds, subject to the precision and accuracy of system timers and schedulers.

Upvotes: 1

Related Questions