for (int i=0; i<60000; i++) // i think this loop takes aboout a minute
It won't :) On my machine at work (which is extremely slow because of lack of memory, it often spends 5 minutes swapping data when I switch applications) it took 2 minutes almost to the second.
Anyway, it won't print out strings with an average interval of one minute.
For that you need to use a Thread which sleeps for a random interval.
Of course you can't possibly create an unknown number of random intervals yet have those have an average time of a minute.
At best you can create a random number between 2 limits and use that as the interval where the average between those numbers is one minute (in milliseconds which is the measure of time used by Thread.sleep()).
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337