Much improved rate function, though not perfect.

Some programs run faster than specified, and all programs run faster during the first second.