This question could be answered in a language-agnostic fashion, but I am using python (fyi).
I am running an infinite loop which needs to terminate when during the last minute <10 new objects are discovered.
Eg:
while True:
newobjs = dig_more_objects(obj)
if less than 10 newobjs have been discovered over the last minute
break
EDIT: The question is this: How do I implement this line:
if less than 10 newobjs have been discovered over the last minute
Here’s a rough stab at it — depending on the nature of
dig_more_objectsyou may need to adjust the condition: