In E.N. Publishing's Tournaments, Fairs, & Taverns, we have rules for various sorts of races. The basics are as follows -
Each racer gets a +1 bonus for every 10 ft. its running speed exceeds 100 ft. per round. Thus a typical human gets a +2, and a racehorse (base speed 60, Run feat, run speed 300) would get +20.
Trying to simulate the exact round by round race is difficult and usually unnecessary, so simply set a Target Number (kind of like a DC that you can reach over the course of several rounds), and each 'round', roll d20 + racer's speed bonus + racer's strength bonus, and add the results. The racer that reaches the target number first (or, in the case they reach in the same round, the one that ends with the highest degree of success) wins the race.
There are two scales you can base a race on. One is a direct scale, where 1 point of degree of success (DS) is equal to 10 ft. of track. In this scale, basically each round of the race is a round of realtime. The other is relative scale, where 1 point of DS is 50 ft. or more. You'll usually only use direct scale for short races, ones that can be run in less than a minute.
Races typically have a target number that will require no more than 10 rolls. That's about the limit to how many times you can roll dice on a single race without getting bored, and shorter races might still be in relative scale just to speed things along.
A quick horse sprint might have a total distance of one mile, so while that would require a Target Number of 528 with direct scale, that would typically take over 10 rounds, since an average horse will get 30 or so points each round. Thus, you'd probably have such a race be run in relative scale, with a target number of 100. A long marathon race might have a Target Number of 300, with a mile equal to 5 points.
Fatigue: In direct scale races, don't worry about exhaustion. In relative scale races, however, each round, racers must succeed a Fort save (DC 15 +1 for each previous round) or become fatigued. A fatigued creature suffers a -1 penalty to its racing check, because it's strength is reduced. If a fatigued creature fails another Fort save, it becomes exhausted. Recalculate its race check modifier using just its double move speed, and it has a -3 penalty because of strength reduction.
A fatigued racer may choose to move at its exhausted speed for a round, after which time it is no longer fatigued. An exhausted racer can choose to stop for a round, after which time it becomes just fatigued.
Spurring a Mount: For horse races, the rider can make a Ride check (DC 15) to spur his horse on and give it a +2 bonus to its race check and its Fort save for the round.
Example:A typical horse has a race check bonus of +24 (+20 for 300 ft. run speed, +4 for Strength). When fatigued, this falls to +23. When exhausted, this falls to +3 (+2 for a double move speed of 120, +4 for Strength, -3 from exhaustion).