You Are Here:

Community: Developer Discussion Boards

#1 Old Question Sleep until keypressed - 2008-07-08, 21:54

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
How could I interrupt a sleep time imediatley after a kepress? In OPL it was done by giving a negative time value. How is it done in PS60?


PyNetMony - the ultimate War- and BlueWalking tool and 2G/3G Netmonitor
http://pynetmony.googlepages.com/home
Reply With Quote

#2 Old Re: Sleep until keypressed - 2008-07-09, 18:08

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by carknue View Post
How could I interrupt a sleep time imediatley after a kepress? In OPL it was done by giving a negative time value. How is it done in PS60?
Timers,

Still don't like them, but at least I now know how to go around crashes. Maybe this will help you:

http://jouni.miettunen.googlepages.com/timersample

When you get timers right, please check "keycapturer". That's pretty nice way to catch "any" keypress and start a callback where to cancel your timer. This might contain some sample code:

http://jouni.miettunen.googlepages.com/watchme-lightnow

Btw I recall "sleep" is dangerous, potential crash at exit. Timer with a callback is more safe, can be cancelled.

Enjoy,

--jouni
Reply With Quote

#3 Old Re: Sleep until keypressed - 2008-07-09, 18:15

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by JOM View Post
Timers,

Still don't like them, but at least I now know how to go around crashes. Maybe this will help you:

http://jouni.miettunen.googlepages.com/timersample

When you get timers right, please check "keycapturer". That's pretty nice way to catch "any" keypress and start a callback where to cancel your timer. This might contain some sample code:

http://jouni.miettunen.googlepages.com/watchme-lightnow

Btw I recall "sleep" is dangerous, potential crash at exit. Timer with a callback is more safe, can be cancelled.

Enjoy,

--jouni
I am second to that!

e32.ao_sleep would be more battery consuming rather than the timers.
I guess jouni doesn't like the timers because its difficult to manipulate them according to the statements used.

But carknue, you have a ready to use code for timer at Jouni's website

Cheers,
Croozeus
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
Similar Threads
Thread Thread Starter Forum Replies Last Post
sleep? zwgoal General Symbian C++ 1 2005-11-24 09:38
keyPressed in GameCanvas vs. animation threading (help?) murid Mobile Java General 0 2005-10-27 16:50
KeyPressed() and getKeyEvents in the same time darkermaster Mobile Java General 1 2004-06-03 04:13
timeout? sleep? y10913 Symbian Tools & SDKs 2 2004-02-06 19:08
Series 60 keyPressed fmhunter Mobile Java Tools & SDKs 1 2002-10-27 15:13

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