View Single Post
Old 04-24-2012, 12:16 PM   #5
kiri87
Member
kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.kiri87 knows what's going on.
 
Posts: 16
Karma: 25544
Join Date: Feb 2012
Device: Kindle 3
I'm getting the with time() and localtime(). I'm not sure why the getmsec() function call was left in there. Initially I planned to update the clock every minute, so it won't affect the battery too much, thus, using sleep() wouldn't be that bad, even though it might be half a second off.
The angle of each hand is always calculated corectly, but sometimes the seconds line skips a beat (eg: 2 sleep(1)s that return after 1.5 seconds), so that's why sometimes the lines don't appear to be uniformly spaced.
I have updated to the latest gmlib, but it seems that "eips -g ./clockFrame2.png" no longer works. It flashes the image on screen, but after calling gmlib(GMLIB_UPDATE), it's replaced with an image from tmp/wb0. In my case, the last image from the hoser-2.0 demo https://www.mobileread.com/forums/sho...9&postcount=32 was displayed behind the clock.
I'll have to look into the screensaver disabling solution, when I have the time. These are the precious calls, correct?
Code:
lipc-set-prop com.lab126.powerd preventScreenSaver 1
killall -stop Xorg cvm # pause framework

killall -cont cvm Xorg # resume framework
lipc-set-prop com.lab126.powerd preventScreenSaver 0
kiri87 is offline   Reply With Quote