Skip to content

public static void pause(int td) uses bad practices for time #20

@dylanwilbur

Description

@dylanwilbur

Using nested for loops takes up memory and cannot accurately pause time across different machines.
Also, it did not pause for td seconds as the readme suggests, as it is not really feasible to accurately measure time with for loops.

In Canvas.java:

public static void pause(int td) {
  try {
    Thread.sleep(td*1000)
  } catch(InterruptedException ex) {
    Thread.currentThread().interrupt();
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions