Well, theoretically every 10 turns, if you take into account the time it takes for happiness to get back to normal. But you can bring happiness down a few points by rushing 3 times in 9 turns, and then wait for 21 turns so your happiness could go back up. Or maybe you meant every 5 turns because it takes the city that long to grow back the one pop? In the best case scenario, a city at pop 2 can have +6 food. With a granary, you only need 11 food to grow back, so again, theoretically you can do this every other turn until unhappiness stops you.
So best case scenario with at least +4 food (easy) and 3 extra happiness (not so easy), you can make the library in 9 turns :
1. Start a low cost unit
2. Whip the low cost unit
3. Apply overflow to library
4. Start a low cost unit
5. Whip the low cost unit
6. Apply overflow to library
7. Start a low cost unit
8. Whip the low cost unit
9. Apply overflow to library
Of course, this will cost you a lot of unhappiness. A method that would be far less unhappiness intensive, but yield fewer free hammers, would be to produce 15 to 29 hammers on the library while growing to size 4, then whip 2 pop, yielding 90 hammers, and only costing you 1 unhappiness instead of 3. In most cases, this would be the best approach for something as small as a library, and which doesn't get a penalty when pop rushing like a wonder does. An exception would be a city with the Globe Theatre, where unhappiness is not an issue and the above method is better, giving you 3 units on top of the library.
As an aside, using this method to rush the Globe Theatre itself (i.e. rushing units and using the overlflow) is a great idea because as soon as you actually finish it, all the unhappiness that it cost you will instantly disappear.