How long was David's reign?

How long was David’s reign?