Design by contract and relational interface theories are powerful for specifying component-based systems. We extend these theories with real-time properties so that our technique can model component-based real-time systems. In addition, we use linear temporal logic (LTL) for specifying the invariant properties of contracts. To specify the interaction between methods in a component, and the interaction between components, we use the timed regular expressions over a distributed alphabet. The correctness of a system model is based on the correctness by construction approach. We show several examples that our technique is powerful and useful to guarantee the correctness of component-based systems with real-time requirements.