Try and give them the first piss after taking it the night before
This is basically a guarantee that you'll piss hot.
now, if you're talking about the same day, you'll have some (a lot) of variations depending on the route of administration.
IV I've read takes about 15-20 mins to get into urine (dependent on the hydration level, no fluids= no urine produced and therefore no metabolites in urine)
Insufflation is slower but still within 45 mins I've read, and I'd assume oral is even slower yet, like 1-2 hours.