[PySide] can time.sleep(secs) suspend QNetworkAccessManager does request asynchronously?
2281570025 at qq.com
Sun Dec 21 15:56:42 CET 2014
while QNetworkAccessManager can do requests asynchronously, and time.sleep(secs) can suspend execution for the given number of seconds, then I was confused by the following code,does t2 here always greater then 10s here?
Regardless the affecting factors for time.sleep(secs) mentioned in Python document , and suppose the time from sending request to getting the result without time.sleep(10) in the code here ,i.e. the finished slot getWebPageSRC was called is fixed,equals 3s.
P.S. I have tested a few times , found t2 always greater then 10s, anyone can explain why ?
the question also posted here
reply.finished.connect(self.getWebPageSRC) self.t=time.clock() time.sleep(10) def getWebPageSRC(self): t2=time.clock()-self.t print(t2)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PySide