y = resint(x,newoutp,reset,init);
Returns the integral of x with respect to the time. The initial value of y is equal to the value of init. The output of this integral is reset to the value of newoutp when the Boolean argument reset is TRUE.
x = 1;
reset = event(sin(time));
y = resint(x,0,reset,0);
or
x = 1;
reset = if y > 10 then true else false end;
y = resint(x,0,reset,0);