package com.hithomelabs.princeton1.module5;

public class SortingMetaData {

    private double tick;
    private double tok;
    private double exchanges;
    private double compares;

    public double timeElapsed(){
        return tok - tick;
    }

    public void startTime(){
        tick = System.nanoTime();
    }

    public void endTime(){
        tok = System.nanoTime();
    }

    public void incrementCompares(){
        ++compares;
    }

    public void incrementExchanges(){
        ++exchanges;
    }

    public double getExchanges(){
        return exchanges;
    }
    public double getCompares(){
        return compares;
    }

    @Override
    public String toString() {
        return "Time elapsed: " + this.timeElapsed() + " nano-seconds \nCompares: "+this.compares+ "\nSwaps: "+this.exchanges;
    }
}
