In AAA style using the explicitly typed initializer idiom:
#include <chrono>
#include <iostream>
int main(){
auto start = std::chrono::high_resolution_clock::now();
// Code to time here...
auto end = std::chrono::high_resolution_clock::now();
auto dur = end - start;
auto i_millis = std::chrono::duration_cast<std::chrono::milliseconds>(dur);
auto f_secs = std::chrono::duration_cast<std::chrono::duration<float>>(dur);
std::cout << i_millis.count() << '\n';
std::cout << f_secs.count() << '\n';
}