Like this:
thread t1(getPrimes,begin,end, ref(vect));
start = chrono::high_resolution_clock::now();
t1.join();
finish = chrono::high_resolution_clock::now();
Or like this:
start = chrono::high_resolution_clock::now();
thread t1(getPrimes,begin,end, ref(vect));
t1.join();
finish = chrono::high_resolution_clock::now();
Should I start it before or after thread t1?