stanley-king 2 年之前
父節點
當前提交
7e32b72d1f
共有 1 個文件被更改,包括 4 次插入0 次删除
  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