Well, you probably got code that looks like this:
Every X seconds: Add 1 to counter.
What you do now, is, you create a variable called "interval" for example, initial value could be 2.
You insert that variable into the "Every X seconds" condition at the position of the X.
Next and last thing is to add an action underneath the "Add 1 to counter", being:
Set "interval" to: interval - (counter % 4 = 0 ? Y : 0).
Replace Y with the amount of seconds you want the interval to decrease.
This assumes that your counter starts at 1 and not at 0. If it starts at 0, put counter+1.
If you need any more help or a .capx, give me a shout.
(A .capx always explains better)