public void printResults()
    {
        int minTurnaroundTime = Integer.MAX_VALUE;
        double avgTurnaroundTime = 0;
        int maxTurnaroundTime = 0;

        int minInitialWaitTime = Integer.MAX_VALUE;
        double avgInitialWaitTime = 0;
        int maxInitialWaitTime = 0;
        
        int minTotalWaitTime = Integer.MAX_VALUE;
        double avgTotalWaitTime = 0;
        int maxTotalWaitTime = 0;

        for(Process process : finishedProcesses)
        {
            // True turnaround time is the time taken to run process and the total time waiting
            // process.setTimeTotal();

            avgTurnaroundTime += process.getTimeTotal();
            avgInitialWaitTime += process.getTimeInitiallyWaiting();
            avgTotalWaitTime += process.getTimeWaiting();


            if (process.getTimeTotal() > maxTurnaroundTime)
            {
                maxTurnaroundTime = process.getTimeTotal();
            }
            if (process.getTimeTotal() < minTurnaroundTime)
            {
                minTurnaroundTime = process.getTimeTotal();
            }

            if (process.getTimeInitiallyWaiting() > maxInitialWaitTime)
            {
                maxInitialWaitTime = process.getTimeInitiallyWaiting();
            }
            if (process.getTimeInitiallyWaiting() < minInitialWaitTime)
            {
                minInitialWaitTime = process.getTimeInitiallyWaiting();
            }

            if (process.getTimeWaiting() > maxTotalWaitTime)
            {
                maxTotalWaitTime = process.getTimeWaiting();
            }
            if (process.getTimeWaiting() < minTotalWaitTime)
            {
                minTotalWaitTime = process.getTimeWaiting();
            }
        }

        int finishedProcessesSize = finishedProcesses.size();
        avgTurnaroundTime /= finishedProcessesSize;
        avgInitialWaitTime /= finishedProcessesSize;
        avgTotalWaitTime /= finishedProcessesSize;

        System.out.printf("Number of CPUs: %d\n", Main.CPU_COUNT);
        System.out.printf("Turnaround time: min %dms; avg %.3fms; max %dms\n", minTurnaroundTime, avgTurnaroundTime, maxTurnaroundTime);
        System.out.printf("Initial wait time: min %dms; avg %.3fms; max %dms\n", minInitialWaitTime, avgInitialWaitTime, maxInitialWaitTime);
        System.out.printf("Total wait time: min %dms; avg %.3fms; max %dms\n\n", minTotalWaitTime, avgTotalWaitTime, maxTotalWaitTime);
    }