Yes, that hits the API for new flags every x milliseconds.

Follow-up question: Will such startListening(ms) API calls be counted in monthly quota? Answer: Yes, this will count against your monthly API quota.