Does count Traffic on Dude be possible?

Hello.

I find a question from a network device.
Some kind of Network devices doesn’t provide traffic in 5 sec from any port.
But SNMP only show total traffic from start to now.
So, i need count by my self.

The formula is:
Now accumulation traffic - before 5 sec traffic = traffic in 5 sec.

Does any good idea for get traffic in 5 sec smartly on dude ?

Thanks.