function r = dTimerT(t,x,d,z,p)
%x-continunous state vector
% x = [xTT yTT];
%z-discrete state vector
% z = [tresT onT];
%p-parameter vector
% p = [tauT];

r = zeros(2,1);
r(1) = d(1) - z(2);
r(2) = x(2) - x(1) + z(1);