Calculate deltatime each update