Search for constant current driver.. There are multiple circuits on the net and in the forums here. What you charge with a constant current source is irrelevant. The charging current will need to be chosen to give a range/resolution that is useful for your application, perhaps adjustable. And if you want to do this automatically you'll need some kind of timing circuit to measure the length of time it takes.