Adding functions to get the object closest (before or after) to a particular timestamp and to sort objects based on their timestamp.