And it came to pass after forty years, that Absalom said unto the king, I pray thee, let me go and pay my vow, which I have vowed unto the LORD, in Hebron. ... But Absalom sent spies throughout all the tribes of Israel, saying, As soon as ye hear the sound of the trumpet, then ye shall say, Absalom reigneth in Hebron. 2 Samuel 15:7-10
David was thirty years old when he began to reign, and he reigned forty years. 2 Samuel 5:4
Note from The New Oxford Annotated Bible for 2 Samuel 15:7-10: "The conspiracy was carefully nurtured for a period of four years."