A nicer way of doing this is by using the std::chrono library.
// Needed for `1s` syntax
using namespace std::chrono_literals;
// Your code
auto const old = last;
last = steady_clock::now();
const duration<float> frameTime = last - old;
// Use `frameTime` as your delta time
auto fps = 1s / frameTime;