You Are Here:

Community: Developer Discussion Boards

#1 Old Bug in time.sleep? - 2005-08-22, 16:01

Join Date: Jul 2004
Posts: 17
jkirma
Offline
Registered User
I haven't made a proper test case for this since I found it while panic-hacking a small script on vacation, but anyway...

It seems that time.sleep doesn't work as expected with large sleep values. I observed that with 3600 second sleep, the thread seems to exit silently (I tried this with fast SIS version). OTOH, with 1800 seconds, it works fine.

My guess would be that the argument is multiplied by million (to get microseconds), and then converted to 32-bit signed integer. After this, it's passed in form or another to some system-level function which acts differently if the argument is negative. (And it'll be, since 3.6 billion overflows 2G limit.)
Reply With Quote

#2 Old 2005-08-22, 17:16

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Seems like this is a bug in the Symbian STDLIB sleep() function. Filed as bug #231. Thanks for the report.
Last edited by jplauril : 2005-08-23 at 12:24.
Reply With Quote

#3 Old 2005-08-22, 17:32

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Addition: e32.ao_sleep() suffers from the same problem.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia