stanley-king hace 2 años
padre
commit
7e32b72d1f
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      plot/refill/DataStream.py

+ 4 - 0
plot/refill/DataStream.py

@@ -1,3 +1,4 @@
+import time
 from abc import ABCMeta, abstractmethod, ABC
 from datetime import timedelta
 from mpi4py import MPI
@@ -185,6 +186,9 @@ class DataReadStream(metaclass=ABCMeta):
         if len(self._days) == 0:
             return None
 
+        if time_stamp > int(time.time()):
+            time_stamp = int(time.time())
+
         if left:
             min = self._days[0]
             time_stamp = min if time_stamp < min else time_stamp