When I was researching my kid's ADHD medicine I was fascinated to learn about its osmotic release delivery system (https://en.wikipedia.org/wiki/Osmotic-controlled_release_ora...).
What looks like a simple pill is actually a tiny machine that delivers the medicine at a precisely controlled rate over a period of hours.