Hi Pythagorean,
I found a simple solution that works for me.
Inside func2 and just before line "[t, x, te, xe, ie] = ode45 ( @de, [t0 tf], x0, options );" i record the internal CPU time.
Inside function 'de', i check the new CPU time against what was recorded initially, and if 'x' seconds...