Skip to content

Instantly share code, notes, and snippets.

@abelsromero
Last active January 12, 2017 16:52
Show Gist options
  • Select an option

  • Save abelsromero/65b74ad5038f5f222bb336b359f97ce1 to your computer and use it in GitHub Desktop.

Select an option

Save abelsromero/65b74ad5038f5f222bb336b359f97ce1 to your computer and use it in GitHub Desktop.
public class MemoryConsumer {
public static void main(String[] args) {
long seconds = 30000;
long start = System.currentTimeMillis();
Long sillyCounter = 0l;
while (start + seconds > System.currentTimeMillis())
sillyCounter++;
System.out.println("Counter: " + sillyCounter);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment