The current alarm infrastructure has a baroque scheme based on a future limit and a late limit to determine when a scheduled alarm is in the past or if it is due so soon it might be missed before the hardware can be updated. Junk all that and just use signed comparisons, requiring that settings be no more than half the maximum clock value away from the current time.
The current alarm infrastructure has a baroque scheme based on a future limit and a late limit to determine when a scheduled alarm is in the past or if it is due so soon it might be missed before the hardware can be updated. Junk all that and just use signed comparisons, requiring that settings be no more than half the maximum clock value away from the current time.