Your deltaTime() function is making a new clock every time you call it. The clock starts at zero.
You need to make one clock and keep using it. Either move the clock outside of the function or place the "static" keyword before the clock in the function. (Static on a variable in a function makes it continue to live after the function ends and reuses it next time without recreating it).