To get more precision and less accumulative errors you should replace:
nextTime = Time.time + sendRate;
with
nextTime += sendRate;
The reason is you enter the if statement when Time.time is greater than your desired execution time. If you use the current time + your sendRate you add this little “overshooting amount” to your delay. However if you add the sendRate to the old time you always get an evenly spaced call count.
With this approach you have to make sure to initialize sendRate with a good start value. The best thing is to add a security check like this:
if (Time.time >= nextTime) {
MyMethod();
nextTime += sendRate;
if (Time.time >= nextTime)
nextTime = Time.time + sendRate;
}
That way if nextTime “lags way behind” it will be set to a fix point in the future. This is important if you can “disable” this check so Time.time can go way beyond the last nextTime value. Without that check it will call your method each frame until nextTime catches up with the current time when reenabled.