NanoTime in java 8 : I am a beginner in java 
I want compute the execution time of my methods with System.nanoTime and pass this time as stream argument to comparison method and put them in an Long array from [2] to [5], and return this array
my problem is i do not know how can i do, because i tried different ways but i had error and i did not have any answer
please help me how can i do this in java 8
my code is:

   

     import java.util.stream.Stream;
        import java.io.*;
        import java.nio.file.*;
        import java.util.Arrays;
        import java.util.Comparator;
        import java.util.List;
        import java.util.Map;
        import java.util.function.Function;
        import java.util.stream.Collectors;
        import java.util.stream.LongStream;
        import java.lang.Object;
        import java.util.stream.IntStream;
        
        
        
        /*
         * To change this license header, choose License Headers in Project Properties.
         * To change this template file, choose Tools | Templates
         * and open the template in the editor.
         */
        
        
        /**
         *
         * @author user
         */
        
        
        public class WinneropsDB implements Winner{
            
             
            
                 private  int getYear;
                 private int getWinnerAge;
                 private String getWinnerName;
                 private String getFilmTitle;
                 
                 
                 public WinneropsDB(String s) {
                     
                     String[] Data = s.split(",",5);
                     getYear = Integer.parseInt(Data[1]);
                     getWinnerAge = Integer.parseInt(Data[2]);
                     getWinnerName = Data[3].substring(1,Data[3].length()-1);
                     getFilmTitle = Data[4].substring(1,Data[4].length()-1);
                     
                            
            }
                 @Override
            public String toString(){
            
                return getYear+", "+getWinnerAge+", "+getWinnerName+", "+getFilmTitle;
            }
            
          
            
            public static Stream<Winner> loadData(String[] fileName)  {
                return Arrays.stream(fileName).flatMap(f -> {
                    try {
                        return Files.lines(Paths.get(f))
                                .filter(first -> !first.startsWith("#"))
                                .map(WinneropsDB:: new);
                    } catch (IOException e) {
                        System.out.println("file not found");
                        return null;
                    }
                });
                        }
            
            /**
             *
             * @param young
             * @return
             */
            public static Stream<Winner> youngWinners(Stream<Winner> young) {
              return young.filter(w -> w.getWinnerAge() < 35)
                      .sorted(Comparator.comparing(Winner :: getWinnerName));
              
              
                
            }
            
            public static Stream<Winner> extreamWinners (Stream<Winner> mix){
                  long startTime = System.nanoTime();
           
                 Comparator<Winner> comparator = Comparator.comparing(Winner -> Winner.getWinnerName());
                 Stream<Winner> m = mix.sorted(comparator);
               //  Winner[] g = (Winner[]) m.toArray();
                 //System.out.println(g[0]);
                 Comparator<Winner> comparator1 = Comparator.comparing(Winner -> Winner.getWinnerAge());
                 Stream<Winner> m1 = m.sorted(comparator1);
                 Winner[] lis = m1.toArray(s -> new Winner[s]);
                     Winner youngest = lis[0];
                     Winner oldest = lis[lis.length - 1];
                      Arrays.stream(lis).forEach(System.out::println);
                     System.out.println("youngest: " + youngest +  "       oldest: " + oldest);
                       long finishTime = System.nanoTime();
                    long timeWinner = finishTime - startTime;
                     System.out.println("timeWinner: " + timeWinner);
                    comparison(Stream.of(timeWinner));
                    
                     return m1;
           
            }
              
          
         
            
           public static Stream<String> multiAwardedPerson(Stream<Winner> m){
               long startTime = System.nanoTime();
          
               Comparator<Winner> comprator = Comparator.comparing(Winner -> Winner.getWinnerName());
                  Map<String,List<Winner>> c1 = m.collect(Collectors.groupingBy(Winner::getWinnerName)); //, Collectors.counting()));
                 long finishTime = System.nanoTime();
                 long timePerson = finishTime - startTime;
                  System.out.println("timePerson: " + timePerson);
                 comparison(Stream.of(timePerson));
             return c1.values().stream().filter(s -> s.size()>= 2).map(e -> e.get(0)).sorted(comprator).map(f -> f.getWinnerName());
            
           
           } 
           
           public static Stream<String> multiAwardedFilm(Stream<Winner> d){
               long startTime = System.nanoTime();   
                Comparator<Winner> comprator = Comparator.comparing(Winner -> Winner.getYear());
                  Map<Integer,List<Winner>> c1 = d.collect(Collectors.groupingBy(Winner::getYear));
                   long finishTime = System.nanoTime();
                    long timeFilm = finishTime - startTime;
                    System.out.println(" timeFilm: " + timeFilm);
                    comparison(Stream.of(timeFilm));
                    
                 return
                         c1.values().stream().filter(f -> f.size() == 2).map(t -> t.get(0)).sorted(comprator).map(y -> y.getFilmTitle());
                    
               
           }
           
           
           public static <T, U> long measure(Function<Stream<T>,Stream<U>> f , Stream<T> s1){
               
                     long startTime = System.nanoTime();
                     Stream<U> s2 = f.apply(s1);
                     List<U> collect = s2.collect(Collectors.toList());
                     long endTime = System.nanoTime();
                     long time = endTime - startTime;
                    
                     
                     
               return time;
           
              
           }
           
           
         
           
               
           
           public static long[] comparison(Stream<Winner> e){
              
                   long [] arrayTime = LongStream.of(e).toArray();
        
                   
               
               
               
               return null;
           
               
           }
            
            
            
            
            
            /**
             * @param args the command line arguments
             * @throws java.io.FileNotFoundException
             */
            public static void main(String[] args) throws FileNotFoundException {
                
                
                String[] fileName = {"G:\\path\\oscar_age_female.csv" , "G:\\path\\oscar_age_male.csv"};
             
                     // TODO code application logic here
                     Stream<Winner> loadData = loadData(fileName);
                    //loadData.forEach(x -> System.out.println(x));
                   //  Stream<Winner> young = youngWinners(loadData);
                  //  young.forEach(a -> System.out.println(a));
                  Stream<Winner> mix1 = extreamWinners(loadData);
                 Stream<String> winner = multiAwardedPerson(loadData);
        //         winner.forEach(q -> System.out.println(q));
                    Stream<String> date = multiAwardedFilm(loadData);
        //            date.forEach(l -> System.out.println(l));
        
                        
                     
                  
                       
        
            }
            
           
        
            @Override
            public int getYear() {
                return getYear;
            }
        
            @Override
            public int getWinnerAge() {
                return getWinnerAge;
            }
        
            @Override
            public String getWinnerName() {
                return getWinnerName;
            }
        
            @Override
            public String getFilmTitle() {
                return getFilmTitle;
            }
            
        }
           