How to insert into table in database after every 5 minutes using Real time clock module
int mint = util::getMinute();

if (util::getMinute() - mint &gt;= 5)

{


Well, if mint is util::getMinute() then surely util::getMinute() - mint will always be 0.

I think you meant mint to be static, or a variable in the global scope.