ALT Linux Bugzilla
– Attachment 3228 Details for
Bug 18547
[FR] add smart refresh patch
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
wmmoonclock_smart_display_refresh.patch
wmmoonclock_smart_display_refresh.patch (text/plain), 879 bytes, created by
Michael Shigorin
on 2009-01-17 23:57:22 MSK
(
hide
)
Description:
wmmoonclock_smart_display_refresh.patch
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2009-01-17 23:57:22 MSK
Size:
879 bytes
patch
obsolete
>--- wmmoonclock-1.27.orig/Src/wmMoonClock.c >+++ wmmoonclock-1.27/Src/wmMoonClock.c >@@ -123,7 +123,7 @@ > /* > * Delay between refreshes (in microseconds) > */ >-#define DELAY 100000L >+#define DELAY 1000000L > #define WMMOONCLOCK_VERSION "1.27" > > >@@ -165,6 +165,8 @@ > double UT, val, RA, DEC, UTRise, UTSet, LocalHour, hour24(); > int D, H, M, S, sgn, A, B, q; > CTrans c; >+ struct timeval timeout; >+ fd_set xfdset; > > > >@@ -703,6 +705,11 @@ > > > >+ /* >+ * Add X display to file descriptor set for polling. >+ */ >+ FD_ZERO(&xfdset); >+ FD_SET(ConnectionNumber(display), &xfdset); > > > >@@ -732,7 +739,9 @@ > * Redraw and wait for next update > */ > RedrawWindow(); >- usleep(DELAY); >+ timeout.tv_sec = DELAY / 1000000L; >+ timeout.tv_usec = DELAY % 1000000L; >+ select(ConnectionNumber(display) + 1, &xfdset, NULL, NULL, &timeout); > > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18547
: 3228