To be blunt as fuck, 2-3 whole hours and even then the opiates wont be 100% effective if you really want the most for your money, do the heroin first, then you can smoke crack later but if youre not accustomed to mixing opiates and crack, speaking from exp, heavy opiate user here... the opiates lower your bp/heart rate significantly and its EASY to oversmoke OR other way around, still be stimulated and take too much and basically OD you have to learn each substance on their own and THEN and only then will you answer your own question because mixing two high-risk od substances that youre not used to mixing is a recipe for disaster. You need to learn how much you can handle with said substance alone NOW IF YOU USE DOPE ALONE AND KNOW HOW MUCH TO TAKE, it doesnt matter when the fuck you take it, i take morphine, ozy, hydros all the time while smoking crack the thing is, you need to know that you can EASILY go overboard and smoke much more than you can handle which never ends well, in the past ive taken a half gram hit of really pure fishscale and it was a minute of heaven before i thought my heart would explode and i ended up running to my meds, ate idk how many benzos and a handful of different opiates and to this day ik they saved my life but, i shared this story because if you choose to continue smoking after using an opiate you can and will oversmoke, not to mention ( if youre like me) and wana experience the best out of your opiate, do it without taking a stimulant now if youre trying to come down using heroin from crack well, its genuinely not the most effective way, but just last night i took 2.5mg kpin 9mg dilaudid and 30-40mg morphine all crushed up to come down off a 3 day adderall binge where i used around pf i lost count tbh theres capsules all over my floor ( i crush those too) all that said, im a tolerant habitual user and do not endorse anyone to recreate my pattern of use but for the sake of a simple answer is, Whenever you wana take your dope, take it it can be right after a crack hit, but beware it wont be fully effective but hey, itll add to the high but opiates alone for crack comedowns / speed doesnt really do the trick and genuinely feels like a waste without a benzo in the mix and rhats another problem unless youre tolerant to all these things you SHOULD NOT mix them thats not to say they CANT be mixed but you walk a fine line if youre not 100% how you will be effected