Implementd frame time function to clean 0s at the start and end of time series