diff options
-rw-r--r-- | src/fit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5344,7 +5344,7 @@ int fit_event(event *ev, double *xopt, double *fmin, int id, double maxtime) nlopt_optimize(opt,x,&fval); gettimeofday(&tv_stop, NULL); - time_elapsed = tv_stop.tv_sec - tv_start.tv_sec + (tv_stop.tv_usec - tv_start.tv_usec)/1e6; + time_elapsed += tv_stop.tv_sec - tv_start.tv_sec + (tv_stop.tv_usec - tv_start.tv_usec)/1e6; if (stop) goto end; } while (fval < *fmin && fabs(fval-*fmin) > 1e-2 && time_elapsed < maxtime); |