One may die anytime. There is a story that illustrates this:
Seeker to wise man: "I wish to Love God, but feel as if I'm not ready. When should I start?"
Wise man: "Not one second before you die."
Seeker: "But revered Sir, I may die tomorrow!"
Wise man: "Precisely, do it now."
We are always in the Eternal Now; The Here and Now; The Sacrament of The Present Moment.
However, to answer your question another way as well, some people are given the Grace to sense it just before they leave this world. My mother was an example. She told my brother to call all her children from abroad, as she would be gone in two days. He laughed.
She had been sick for some time and was confined to a wheel chair, but she did not look bad that day. However, she was gone in two days, and by the time he called us, it was too late.
God-men; Seers; God's Advocates know, as they are one with God's Will. But they are very few in any lifetime. Some advanced Souls also know. It is best though, to always be in a state of readiness for the Beyond.
"Do the things of this world as though you are always going to inhabit it.
Do the things of the other world, as though you are going there tomorrow." - Author unknown.