You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When SLEEP_DURATION is defined as 5000 in redshift.c and we call usleep(3) with 1000 multiplier in systemtime.c in systemtime_msleep() then, at least in NetBSD, usleep(3) doesn't work at all due to limit to 1.000.000 microseconds in this call. This leads to high CPU load due to lack of efficient sleep in redshift loop.
Converting to nanosleep(2) fixes this issue, small patch below (more like illustration rather than real solution but I tried to create a drop-in replacement).
When
SLEEP_DURATION
is defined as 5000 in redshift.c and we callusleep(3)
with 1000 multiplier insystemtime.c
insystemtime_msleep()
then, at least in NetBSD,usleep(3)
doesn't work at all due to limit to 1.000.000 microseconds in this call. This leads to high CPU load due to lack of efficient sleep in redshift loop.Converting to nanosleep(2) fixes this issue, small patch below (more like illustration rather than real solution but I tried to create a drop-in replacement).
The text was updated successfully, but these errors were encountered: