I’m not sure how long exactly .
I got addicted to codeine back in about 2013 or so, due to menstrual pain, then chronic pelvic pain . Since had a diagnosed cause but told worst thing was I’d ended up heavily addicted to cocodamol, dihydrocodeine, etc . Remember saying to my GP, what’s the harm, I only take it to sleep ... she asked if I’d ever found myself rummaging through the house to find a tablet or similar ... I did, frequently, i stockpiled and would panic if I did . I was always depressed, sleepy, craved carbs constantly and gained a lot of weight (ie 6 stone) .
I was taking far over the proper dose especially if they gave me proper dihydrocodeine, I was taking that like bloody smarties at one point .
GP stopped prescribing it in January, then lockdown came in March and I couldn’t buy it over the counter any more . I’ve not had it since lockdown began . I’m managing pelvic pain in different ways where necessary, I’m exercising a lot more now, as I’ve a bit more energy, and generally sleeping a bit better .
Only thing I worry about is GP said they will inevitably need to give it to me again, will need probably fairly regular ops to keep on top of other problems but I’m so glad I’m off it just now - a weird hidden benefit of lockdown ! I was starting to replace it with online shopping as I reduced dose and lockdown has also put a huge stop to that .. thank goodness !
Just if anyone else is struggling with similar, there is another side - it is possible to eventually get back off it, although it doesn’t feel like it at the beginning and hurts like hell coming off it, it is very definitely possible 
.