implement compare in TimeStamp class