I started my algorithm in this way so that it is able to measure its execution time, but I'm not sure if it's right, like continuing with an example:
package heapsort;
public class Heapsort {
public static void main(String[] args) {
int quantidade = 1000;
int[] vetor = new int[quantidade];
int tamanho;
for(int i = 0; i < vetor.length; i++){
vetor[i] = (int) (Math.random()*quantidade);
}
long tempoInicial = System.currentTimeMillis();
}
}