-/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
simgrid::kernel::resource::Resource* resource = nullptr;
simgrid::kernel::profile::Event* event = nullptr;
- if (max_date > 0.0) {
- xbt_assert(max_date > NOW,"You asked to simulate up to %f, but that's in the past already", max_date);
+ if (max_date != -1.0) {
+ xbt_assert(max_date >= NOW, "You asked to simulate up to %f, but that's in the past already", max_date);
time_delta = max_date - NOW;
}
XBT_DEBUG("Looking for next trace event");
- while (1) { // Handle next occurring events until none remains
+ while (true) { // Handle next occurring events until none remains
double next_event_date = simgrid::kernel::profile::future_evt_set.next_date();
XBT_DEBUG("Next TRACE event: %f", next_event_date);
simgrid::s4u::Engine::on_time_advance(time_delta);
- TRACE_paje_dump_buffer(false);
-
return time_delta;
}