It depends on which version you are playing.
Dreamcast version: roughly one hour of feeding and petting the right way.
GameCube version: more like two to three hours.
Either way the method is the same — treat the Chao kindly and let it favour the heroic characters — the GameCube release simply takes longer to get there.