It took me 2 years to write, one of which was all my spare time, so probably about 9 months to a year's full-time work.
Then I found out no-one bought it! Only pure chance led to it being promoted by someone in the industry, maybe 2 years later. I've kept it updated (started on Cubase 6, now on Cubase 13), and it sells reasonably well; maybe £400 a month in revenue, typically for me. So it's not a big earner, but it pays some of my bills, and means it's worth the 2 weeks of work (average) to update it each time Cubase releases a new version.
All of this is selling via Amazon, worldwide, print-on-demand. Previously on Lulu but they were really just sub-contracting on Amazon and while you get less money per copy on Amazon, it out-sells Lulu by 3x (and then Lulu discontinued the sizes I was using so it was a no-brainer).
I've done another book (which is less of a seller in terms of price and numbers), and quite enjoy them, but it's difficult and I think it's more a case of "if I have the time spare I can put this work in and eventually it will pay me back" - possibly over a year or two...