How to determine whether or I got any data via MQTT, using pubsubclient library?

I'm using ESP8266 with PubSubClient library to get data via MQTT. I have a problem, I need to know whether or not I got any kind of data from the topic in the period of 5 sec. How can I solve it?

Do you know how to use millis() for non blocking timing ?

If not, then see Using millis() for timing. A beginners guide, Several things at the same time and look at the BlinkWithoutDelay example in the IDE.

Javokhir:
I'm using ESP8266 with PubSubClient library to get data via MQTT. I have a problem, I need to know whether or not I got any kind of data from the topic in the period of 5 sec. How can I solve it?

You can't, unless you want to modify the source code. Why do you think you want to do this?