What you are doing is feeding on demand, which is correct. Babies around this age drinks every 2 hours. As they get bigger and their tummies can hold more milk they usually eat every 3 to 4 hours. When my baby was less than 1 month old, I let him latch for around 15 minutes.
You can look for these signs as an indication if your baby hungry:
*moving their heads from side to side
opening their mouths
*sticking out their tongues
*placing their hands, fingers, and fists to their mouths
*puckering their lips as if to suck
nuzzling again their mothers' breasts
showing the rooting reflex (when a baby moves its mouth in the direction of something that's stroking or touching its cheek)
*crying
Sometimes babies also latch for comfort. Not neccessary because they are hungry.