If you declare `KEEP_ALIVE_DURATION_MS` as a long, you avoid a lot of casting!