Ensure beep works even very soon after startup
This commit is contained in:
parent
dba01bc014
commit
90a097d45c
@ -893,7 +893,7 @@ static void
|
|||||||
ring_audio_bell(void) {
|
ring_audio_bell(void) {
|
||||||
static monotonic_t last_bell_at = -1;
|
static monotonic_t last_bell_at = -1;
|
||||||
monotonic_t now = monotonic();
|
monotonic_t now = monotonic();
|
||||||
if (now - last_bell_at <= ms_to_monotonic_t(100ll)) return;
|
if (last_bell_at >= 0 && now - last_bell_at <= ms_to_monotonic_t(100ll)) return;
|
||||||
last_bell_at = now;
|
last_bell_at = now;
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
cocoa_system_beep();
|
cocoa_system_beep();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user