Query about usage of IF statement and TIME command together

Problem solved. It was due to an incorrect syntax and an IF statement was missing.

Incorrect syntax:

Correct syntax is:
V=if((V(v_time)>=12.5µ),(if((V(duty)>V(sawtooth2)),15,-5)),0)