As an avid watcher of Border Security, I can tell you that when cocaine or other illegal drugs are detected by a swab (I never saw any swabbing for pot), this gives them a good reason to search the heck out of your bags, but if you aren't carrying, that's an end to it. I saw this at the US border, Canadian border, and Australian border. The Canadian border officers repeatedly said "we don't care what you do on your own time, just what you're bringing in, were you around people doing x?" but I did notice that saying "yes, I was" didn't stop the search or actually seem to be of any benefit to the traveler, except perhaps establishing them as honest and co-operative. At the land border, smelling pot on a person or their possessions definitely led to thorough searching of vehicles. So for a lot of countries, the "answers" in the comments above are generally true: as long as you're not carrying, they won't care that you used it before you arrived. (Side note: the lack of caring is not related to whether or not it's legal where you used it. Border officers are famous for not caring AT ALL about the laws elsewhere, only in their jurisdiction.)
However, this is not a general rule. Singapore can (and apparently does) do drug tests on arrival and arrest people based on blood levels.
“Any Singapore Citizen or Permanent Resident found to have abused controlled drugs overseas will be treated as if he/she had abused drugs in Singapore,” the statement read. “CNB conducts enforcement checks at Singapore’s checkpoints and will take action against those found to have consumed drugs overseas.” - Singapore Central Narcotics Bureau
(The government of Canada later added that they feel this applies to foreigners also.)
Also from that article, since you asked about a quarantine period:
According to the Mayo Clinic, cannabis can be detected in urine three days after use for an occasional user (three times a week), 10 to 15 days for a daily user, or more than 30 days for a heavy chronic user (multiple times a day). For a blood test, it is typically detectable for one to two days, but can increase with more use, and saliva testing it is detectable for one to three days for occasional users. That number rises to 29 days for heavy users, according to Heathline.
Most of the articles I found about this included phrases like "the most serious anti drug policies in the world" or "famously strict drug policies" so don't assume Singapore is typical. There might not be any other countries doing it. But -- there might. Also, back in your own country, if there are drug tests related to employment, child custody, security clearances or whatnot, nobody is going to care "but it was legal where I was!" If it is illegal where they are testing, there will be consequences for testing positive even if you didn't break any laws.