Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6587585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:56:08+00:00 2026-05-25T16:56:08+00:00

This question could be answered in a language-agnostic fashion, but I am using python

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:56:09+00:00Added an answer on May 25, 2026 at 4:56 pm

    Here’s a rough stab at it — depending on the nature of dig_more_objects you may need to adjust the condition:

    import time
    results = []
    while True:
        mark = time.time()
        newobjs = dig_more_objects(obj)
        elapsed = time.time() - mark
        results.append((newobjs, elapsed))
        count = 0
        threshhold = 0
        for objs, elapsed in results[::-1]:
            count += len(objs)  # or +1 of dig_more_objects only returns one at a time
            threshhold += elapsed
            if threshhold > 60.0 and count < 10:
                break
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question has been asked before, but the answered ones I could find were
I understand that this question could be answered with a simple sentence and that
This question could be a can of worms, but I've always wondered if it
This question is related to my ASP.NET MVC 2 development, but it could apply
May be this question has been answered before but I couldn't find it. I
(Note, this question has been marked answered in Debugging Sharepoint timer jobs but I'm
To all mathematicians out there please read the whole question, this could be answered
I could not find the exact question answered on this site. The html on
This may be one of the most answered question. However, I could not find
Pardon if this question has been answered but I couldn't find it. I'm kinda

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.