Commit e7789524 by Patryk Czarnik

Dopisek w IntegerPomiarCzasu

parent 23b4f6ea
...@@ -7,6 +7,7 @@ public class IntPomiarCzasu { ...@@ -7,6 +7,7 @@ public class IntPomiarCzasu {
// obliczamy sumę liczb z dużego zakresu, od 1 do miliard // obliczamy sumę liczb z dużego zakresu, od 1 do miliard
// liczby to będzie int / Integer , a sumę liczymy jako long / Long // liczby to będzie int / Integer , a sumę liczymy jako long / Long
System.out.println("Startujemy...");
long poczatek = System.currentTimeMillis(); // nanoTime - w nanosekundach long poczatek = System.currentTimeMillis(); // nanoTime - w nanosekundach
long suma = 0; long suma = 0;
for(int i = 1; i <= LIMIT; i++) { for(int i = 1; i <= LIMIT; i++) {
......
...@@ -7,6 +7,7 @@ public class IntegerPomiarCzasu { ...@@ -7,6 +7,7 @@ public class IntegerPomiarCzasu {
// obliczamy sumę liczb z dużego zakresu, od 1 do miliard // obliczamy sumę liczb z dużego zakresu, od 1 do miliard
// liczby to będzie int / Integer , a sumę liczymy jako long / Long // liczby to będzie int / Integer , a sumę liczymy jako long / Long
System.out.println("Startujemy...");
long poczatek = System.currentTimeMillis(); // nanoTime - w nanosekundach long poczatek = System.currentTimeMillis(); // nanoTime - w nanosekundach
Long suma = 0L; Long suma = 0L;
for(Integer i = 1; i <= LIMIT; i++) { for(Integer i = 1; i <= LIMIT; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment