+/* Copyright (c) 2023. 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. */
#include <simgrid/Exception.hpp>
#include <simgrid/plugins/battery.hpp>
#include <simgrid/s4u/Actor.hpp>
simgrid::kernel::actor::simcall_answered([this] {
double now = simgrid::s4u::Engine::get_clock();
double time_delta_real = now - last_updated_;
- if (time_delta_real <= 0 or not is_active())
+ if (time_delta_real <= 0 || not is_active())
return;
double time_delta_until_event = next_event_ - last_updated_;
bool event = next_event_ != -1 and time_delta_until_event <= time_delta_real;