[Solved] How to create lag in Java? [duplicate]

I’m not sure I do understand exactly what you want, but it is improbable that you will get it using a sungle thread and an endless empty loop. First, that program will use at most one system thread, and therfore, a single CPU core. Second, the hotspot compiler is likely to optimize away your empty … Read more