Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Projet GORDYJAN_BAGNOLY_GARCIA_POIGNONNEC
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
POIGNONNEC
Projet GORDYJAN_BAGNOLY_GARCIA_POIGNONNEC
Commits
bfd2eff2
Commit
bfd2eff2
authored
May 21, 2019
by
GORDYJAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add time to test it
parent
dedd6f3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
Main.java
src/main/java/openclassroom/Main.java
+23
-0
No files found.
src/main/java/openclassroom/Main.java
View file @
bfd2eff2
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."
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment