E.g. Add a duration parameter to `preventSleep()` and use an `NSTimer` to call `allowSleep()`.
E.g. Add a duration parameter to
preventSleep()and use anNSTimerto callallowSleep().