Commit bfd2eff2 authored by GORDYJAN's avatar GORDYJAN

Add time to test it

parent dedd6f3e
package openclassroom;
package com.company;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Stream;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
public class Main {
public static void main(String[] args) {
Long begin = new Date().getTime();
List<Personne> listP = Arrays.asList(
new Personne(1.80, 70, "A", "Nicolas", Couleur.BLEU),
new Personne(1.56, 50, "B", "Nicole", Couleur.VERRON),
......@@ -40,6 +49,14 @@ public class Main {
.reduce(0.0d, (x,y) -> x+y);
System.out.println(sum);
LocalDateTime currentTime = LocalDateTime.now();
System.out.println("\nDate et heure courange : " + currentTime);
LocalDate date1 = currentTime.toLocalDate();
System.out.println("\nDate courante : " + date1);
/*
long count = sp .filter(x -> x.getPoids() > 50)
.map(x -> x.getPoids())
......@@ -55,5 +72,11 @@ public class Main {
System.out.println(ld); //récupère les informations sous le format défini, ici une liste
*/
Long end = new Date().getTime();
System.out.println("\nDurée d'exécution : " + (end - begin) + " ms.");
}
}
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