The traditional way to determine whether the hubs need repacking, regreasing, and perhaps a ball bearing change is to grab the two sides of the fork or both seatstays after spinning the corresponding wheel. If any vibration or grinding can be felt, it's time to open the hub to inspect and correct.
But suppose I don't want to wait until grinding can be felt. Suppose that after 1-2 years of using a new bike, I have the impression, but can't prove, that the rear wheel used to spin for far longer until rest than it does now.
Can I use the following? When I get a new bike, I spin the rear wheel as fast as I can, and count the seconds until it stops on its own. At every tune-up thereafter, I do the same. If the time is shorter by, say, 25%, it's time for a regrease/repack.
The idea being that if I wait until grinding can be felt, I would have waited not only until the grease is gone, but by then the ball bearings, the cones, or the hubs might have already been damaged. If on the other hand I clean and repack the grease before grinding can be felt, then it's simply a question of adding fresh grease, with no need to replace any parts.