I keep a notebook for songs I'm working on. I've got about 20. I continually work on them in my free time until satisfied. I take notes on each one. And if I find a better way to play a measure, I'll change it. I'll play them on the piano, ukulele, baritone ukulele, and now the guitar.
Once you get the hang of how to sing while playing, it develops quickly. Some songs are easy to play, and can be done is easier keys. It takes a lot longer if it's a song written especially for vocalist, such as Sinatra or Louis Amstrong, and has a lot of complex chord progressions.
It took me about 6 months to be able to play and sing It was a very good year (Dm.) It took me a few hours to learn and play and sing As tears go (Mick Jagger).