var displayTime = 30;
Furthermore, I was able to create an Embeded Data object (I called in TotalTestTime), that measures time from the start of survey. Then I tried to simply put its name in the code, so that when the value of the object reaches 30, it presses NextButton automatically:
var displayTime = 30-TotalTestTime;
I would be very grateful for your help.