Is there a crypto function that would take 1 second to run?
The are already many solutions for this. See for instance Argon2, Lyra2, scrypt.
They allow you to tune the number of iterations so that it takes needed time on particular device (CPU, GPU) to compute a hash.