c
static void ble_hs_timer_sched(int32_t ticks_from_now) {
    // ... (same as above)
    
    int64_t temp_time = (int64_t)now + ticks_from_now; // widening conversion to avoid overflow

    if (temp_time > BLE_HS_FOREVER) {
      abs_time = BLE_HS_FOREVER;
    } else if (temp_time < 0) { // if calculation goes below 0
      abs_time = 0; // adjust lower limit as needed
    } else {
      abs_time = (ble_npl_time_t)temp_time;
    }
    
    // ...
}
