Search:

Type: Posts; User: curmudgeon

Search: Search took 0.11 seconds.

  1. Re: How do you write a timed 'while loop' which prints the no. of loops after a set t

    The key to this question is the logic, not the Java. So in pseudocode, you want to do the following:



    get initial system time, put it in the initTime long variable
    create deltaTimeInSeconds...
  2. Re: How do you write a timed 'while loop' which prints the no. of loops after a set t

    You don't want to check the difference between your counter variables, but instead you want to check the seconds between your timeNow long and one obtained *inside of the while loop*. I'm guessing...
Results 1 to 2 of 2