import struct
from collections import namedtuple
StructDeviceInfo = namedtuple('DeviceInfo', ['DeviceID', 'Capturing','Receiving','Socket','DateTime'])
DeviceInfoList = []
def threaded_function():
while True:
if any(x.Capturing == True and x.Datetime in DeviceInfoList different second > 5 for x in DeviceInfoList) : #here,how to do on here?
print('True')
Capturing Value 内の DeviceInfoList 配列が TRUE であると同時に、Datetime が datetime.now と異なる場合は 5 秒を超えています。次に、trueを印刷します。これを行う方法は?
p/s: キャプチャが TRUE で、datetime が 5 秒を超えている場合、同じ配列インデックスである必要があります。