Why bother with the timing in the first place? RRD is
designed to handle exactly that. As the
man page says:
"The data is time aligned (interpolated) according to the properties of the RRD to which the data is written."
And, from the same author, there is the excellent smokeping which does all that...