Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / plugins / battery.cpp
index 65077e9..21d1ceb 100644 (file)
@@ -1,3 +1,7 @@
+/* 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>
@@ -423,7 +427,7 @@ void Battery::update()
   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;