a fpscounter to count fps periodically