time_weights function

Compute a normalized weighting vector based on a vector of sampling times.