Time delay loop - better way?
Dan Bishop
danb_83 at yahoo.com
Thu Jul 1 03:10:42 EDT 2004
"Terry Reedy" <tjreedy at udel.edu> wrote in message news:<mailman.316.1088637472.27577.python-list at python.org>...
> "Conrad" <bogus_address at nospam.com> wrote in message
> news:pan.2004.06.30.22.48.43.405408 at nospam.com...
> > Greetings,
> >
> > Q: Is there some way to gracefully suspend a python app for a second or
> > so then resume?
>
> time.sleep(secs)
>
> >I could write the classic basic dumb
> > loop-tenzillion-times delay, but that seems inelegant, and well, just
> > wrong.
>
> I believe such loops either hog the CPU or take longer than intended.
Or even worse, a faster CPU comes out and the loop is *shorter* than intended.
More information about the Python-list
mailing list