get_interval function

Obtain time interval of input timestamp vector