Two-Sorted Metric Temporal Logic