Pergunta de entrevista da empresa Google

Given a service that you can query, write a function that will be called every time when query, and the function should return whether there are more than 10 queries in the last second.