Thanks a lot for fixing the _ms. There's still a divide by 1000 mistake here, unless it really is supposed to be in microseconds. Perhaps it's supposed to be a *, in order to have period_s?