all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
12
Task/Time-a-function/Java/time-a-function-2.java
Normal file
12
Task/Time-a-function/Java/time-a-function-2.java
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
public static void main(String[] args){
|
||||
long start, end;
|
||||
start = System.currentTimeMillis();
|
||||
countTo(100000000);
|
||||
end = System.currentTimeMillis();
|
||||
System.out.println("Counting to 100000000 takes "+(end-start)+"ms");
|
||||
start = System.currentTimeMillis();
|
||||
countTo(1000000000L);
|
||||
end = System.currentTimeMillis();
|
||||
System.out.println("Counting to 1000000000 takes "+(end-start)+"ms");
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue