aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fit.c b/src/fit.c
index c519667..9839406 100644
--- a/src/fit.c
+++ b/src/fit.c
@@ -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);