In Poe's "The Cask of Amontillado," we have no definite indication of the time between Fortunato's "insult" and the point at which Montresor's revenge takes place, but we do know that a lapse of time has occurred:
The thousand injuries of Fortunato I had borne as best I could, but when he ventured upon insult, I vowed revenge. You, who so well know the nature of my soul, will not suppose, however, that I gave utterance to a threat. At length I would be avenged. . . .
The phrase "at length" indicates Montresor has taken some period of time, perhaps months, to execute his revenge plot. If we also consider Montresor's comment that "I must not only punish, but punish with impunity" (that is, without getting caught), it makes perfect sense that Montresor would put some time between the insult and the revenge so that no one can make a connection between the two events.
From a practical standpoint--at least from Montresor's perspective--in addition to making sure that no one will connect him with the crime (should it be discovered), Montresor also needs time to lure Fortunato into a false sense of security:
It must be understood, that neither by word nor deed had I given Fortunato cause to doubt my good will. I continued . . . to smile in his face. . . .
In other words, Fortunato must believe that the insult, whatever it is, does not break the friendship between the two men, and the more time that passes without Montresor taking any action, the more convinced Fortunato is that Montresor considers the insult a minor affront rather than a justification for murder.
The lapse of time between Fortunato's insult and Montresor's revenge, then, accomplishes two of Montresor's primary goals for the revenge: he is able to convince Fortunato over some period of time that they are still friends, and he makes it very unlikely that anyone would connect the insult with the disappearance of Fortunato, and he therefore carries out his horrific crime "with impunity."