use a constant for sleep delay
This commit is contained in:
parent
a712429466
commit
191292298c
1 changed files with 3 additions and 1 deletions
|
|
@ -18,6 +18,8 @@ const int MAX_LUMINANCE = 700;
|
||||||
// minimum display brightness in percent
|
// minimum display brightness in percent
|
||||||
const float MIN_BRIGHTNESS_PERCENT = 0.05;
|
const float MIN_BRIGHTNESS_PERCENT = 0.05;
|
||||||
|
|
||||||
|
const int SLEEP_DELAY = 3000;
|
||||||
|
|
||||||
macro abs(x) { return x < 0 ? -x : x; }
|
macro abs(x) { return x < 0 ? -x : x; }
|
||||||
macro clamp(x, l, h) { return max(min(x, h), l); }
|
macro clamp(x, l, h) { return max(min(x, h), l); }
|
||||||
|
|
||||||
|
|
@ -155,7 +157,7 @@ fn int main()
|
||||||
io::eprintfn("Error writing brightness: %s", excuse);
|
io::eprintfn("Error writing brightness: %s", excuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
thread::sleep_ms(3000);
|
thread::sleep_ms(SLEEP_DELAY);
|
||||||
|
|
||||||
// read actual brightness to get the user offset
|
// read actual brightness to get the user offset
|
||||||
int! actual_brightness;
|
int! actual_brightness;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue