Hi PF,(adsbygoogle = window.adsbygoogle || []).push({});

I'm working on a program that requires measuring how long it takes a given computer to process a certain task, but am having trouble coming up with algorithms that won't take most computers a trivial amount of time to perform. The only one I've got so far is recursively computing Fibonacci numbers.

Can anyone suggest similarly simple methods that will tie up a computer for more than an instant? It's fine if the method only slows things down for large inputs.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Trying to come up with simple algorithm of significant time complexity in Java

**Physics Forums | Science Articles, Homework Help, Discussion**