Remember we are not our body. Our body is just a cloak we wear for this incarnation. Thus within us is a spirit. When we meditate, we leave our conscious surroundings and (hopefully) get into this world/this space. In essence, we are spirit. You are spirit, as am I.
Having laid that foundation, when I meditate if I want to time my meditation, or I have somewhere to be, I set a specific time /duration for my meditation by voicing it out within my mind. e.g. "I want to meditate for 30 minutes. At the end of 30 minutes I wish to get out of meditation". I repeat this at least 3 times for it to sink in.
When I started this, it was eerie to come out of meditation to discover the time was exactly as I had asked...
It is also one more point of proof (to yourself) if it happens again and again (skeptics will always doubt you, even if they're the ones asking for proof - without even putting in the effort to try it out for themselves). I just had someone in this group call/discount my (repeated i.e. replicable) experiences during meditation as "magic", asking for the 'confidence interval' of my 'scientific mathematical proof'. And yet, magic is nothing more than anything whose workings we do not understand, "Science yet unknown".
One tip is to do your cleansing breaths and relaxation first before setting the time. This will ensure that you are somewhat into the trance of meditation, to where the communication is effective.
It's also an amazing feeling. One second you're deep in meditation/trance, the next, you're out and wide awake/conscious. And then you look at the clock....
Once you achieve this, you can go into meditation any time, set your internal alarm, and let go completely, confident (from the result of previous experiences) that when it's time, you'll pop out of meditation.