function [val,ter,dir] = eTimerT(t,x,d,z,p)
%event: e1 = time runs out

val = p - x(2);
ter = 1;
dir = -1;