That depends on the type of codeine consumed. For instance, codeine injections provide instant relief from pain. Codeine tablets, liquid syrup, and cough syrup, on the other hand, take around 30 to 60 minutes to work and wear off after a few hours.
https://recoverypartnernetwork.com/drug/opioid/codeine-addiction