Opioids are narcotics, drugs that numb pain. They can be short- or long-acting Short-acting ones may take 15 to 30 minutes to kick in and give you 3-4 hours of pain relief. They help with pain from serious injury or surgery, and they're usually prescribed for pain that lasts only a few days.
If you’ve had moderate to severe pain for a long time, your doctor can give you something with a longer-lasting effect. These can give you steady relief for 8 to 12 hours and are taken on a regular schedule.
You can also use short-acting opioids with a long-acting treatment as “rescue medication” for times when the pain is very bad.