A timing diagram shows how a system component changes state over time by showing how an element or value changes over time.
The primary purpose of the timing diagrams is to show the conditions that change the state of an element of the system at a specific timespan.
In this article
What Is a Timing Diagram?
A timing diagram is a type of UML (Unified Modeling Language) sequence diagram showing the change of state of different system elements over a specific period of time. Usually, a timing diagram uses graphs or waveforms to represent the behavior of an object and state changes along with the time.
The timing diagram shows the time that passes on the x-axis and shows the different components or states of the system on the y-axis. As time passes, the components or objects shift into different states. It clearly shows how much time a process takes to go into another state.
Timing diagrams represent the different elements or objects of the system. Timing diagrams also show the behavior of an object throughout its lifespan. You can see the time required for each state to change into a different state. It also shows the triggering events that cause state change of any object or element of the system
Although the timing diagram is a special type of sequence diagram, the major difference between a timing and sequence diagram is the representation of time for each event. Timing diagram has a major element “Time” which makes it different from the regular sequence diagram.
Timing Diagram Examples
Now we will see some timing diagram examples to understand it in more depth.
1. Timing Diagram for IT Analyst and Developer
This timing diagram example shows two lifelines of an IT Analyst and an IT Developer. Time bars show days from day zero to day three.
- IT Analyst has two states which are “Idle” and “Create Report Analysis”. IT Analyst has a state idle from day zero to day one and changes state from idle to create report analysis on day one and stays in this state from day one to day two then comes into the idle state from day two to day three.
- IT Developer has two states: “Idle” and “Develop the Reports”. The IT Developer stays in an idle state in the first two days and changes the state into a development report from day two to day three.
2. Timing diagram for boat manufacturing
This timing diagram example shows a boat manufacturing process.
- Manufacturing starts from the Hull.
- After the completion of Hull, the manufacturing process goes into Engine design and making.
- After the engine design state, the manufacturing process comes again into Hull state where the engine gets fitted into Hull.
- After that, the process comes into an Upholstery state and then goes into a Quality check process.
This timing diagram example shows a complete process of manufacturing a boat in different states.
3. Timing diagram for Alzheimer Case
Here is a timing diagram example of a patient having Alzheimer's disease.
- In the first 2.7 years, the patient remains in a normal forgetfulness state.
- After that state, the patient enters into the next state of early confusion which remains for almost 2.2 years.
- After that, the disease becomes Mild Alzheimer's and it remains for almost one and a half years.
- Then Moderate Alzheimer’s states come for two and half years and then the final stage comes which is Failure to thrive which leads this disease towards an incurable state.
4. Timing diagram for water temperature and state
This timing diagram example represents the different states of water on the Y-axis and the time on the X-axis.
- The ice state of water changes into a melting state after five minutes.
- The water remains melting from five minutes to 35 minutes.
- After that time, water converts state into liquid form.
This diagram clearly shows how ice converts into water over time.
5. Timing diagram of traffic light
This timing diagram example shows a traffic light state over time.
- The traffic light remains in a red light state.
- After 45 seconds it converts into a yellow light state for three seconds.
- After three seconds, the traffic light becomes green for the next 45 seconds and then it again comes into the red light state.
This cycle repeats itself infinitely into a traffic signal light on roads.
Components of Timing Diagrams
These are the main components of a timing diagram.
Lifeline
A lifeline is a named object closed into a rectangular box or a swimlane that represents a participant in the interaction. Each lifeline represents an entity or object that takes part in the interaction. The boundary of the swimlane shows the life of that participant in the system over time. Multiple lifelines can be stacked to show multiple participants.
This is the graphical representation of a single lifeline.
This is the graphical representation of two lifelines in a single timing diagram example.
State
Each participant in the timing diagram should have different states over time. The state component is used to show the different states of each participant in a timing diagram. States are normally stacked from up to down on the Y-axis into the lifeline of an object.
This is the graphical representation of different states of water from Ice to vapor. Different states are stacked from top to down.
State or Condition timeline
A continuous line that shows the current state of participants over time. This line moves towards different states over time. Condition timeline may also show the events or conditions that trigger the state change process or the object change state after some time.
The Continuous line in the green container shows the state timeline in this timing diagram. Red circle areas show the conditions or events that cause the change into another state.
Timing Bars
Timing bars are the main components of the timing diagram. These bars represent the time into any selected unit on the x-axis of the timing diagram. The time of the diagram starts from the first left bar and ends on the last bar on the most right corner of the x-axis.
The Green highlighted area in this timing diagram example shows the timing bars. This timing diagram example shows how water changes states over time.
Duration Constraint
A time duration in which a specific state should change or a value should be reached. A duration constraint time period should be written into double arrows in the opposite direction on a state timeline.
The Red circled area shows the duration constraint in this timing diagram example. The melting state should take one to six minutes and the evaporation state should take 10 to 25 minutes of time in this timing diagram example.
Time Constraint
Time constraint is used to trigger the state into another state at a specific time. The timing diagram example shows the time constraint.
This timing diagram example shows a time constraint that triggers a state change in traffic light. The traffic light should change its state from red to yellow after 45 seconds and then it should change state from yellow to green in three seconds.
Benefits of timing Diagrams
The timing Diagram shows the different states of each participant in the system. We can analyze the different states of each object in depth by using a timing diagram. It also shows each state over time which is also useful to analyze the system in terms of performance.
Timing diagrams are very useful in system testing and performance enhancements. These diagrams can be used for both forward and reverse engineering to analyze and fix any problem in the system. We can keep track of each change in the system by using timing diagrams throughout the complete life cycle.
We can monitor the interaction of each object with other objects by using a timing diagram. We can also monitor how much time a process takes and we can improve performance by minimizing the time for each process.
Events that change the states of objects can be monitored through timing diagrams. We can also see time constraints on different objects and can fix the duration constraints in which an object should respond. We can handle the flow in case the object doesn’t respond in a given duration constraint.
Timing diagrams are helpful for real-time systems where time is the main concern. We can analyze the complete system for quick and real-time responses and communication between objects. We can also identify delaying objects and can fix them by using a timing diagram.
FAQs
-
Is the timing diagram and sequence diagram the same?
No, Both are different. The timing diagram is a special type of sequence diagram that shows the state changes of participants over time. -
Is a timing diagram a structural diagram or a behavioral diagram?
The timing diagram is the Behavioral Interaction UML diagram. -
When should I make a timing diagram for any system?
When you are dealing with real-time systems or when you need to analyze different states of participants of the system over time and monitor the conditions that trigger those changes. -
Can I add multiple objects of the system into a single timing diagram?
Yes, you can add as many objects as you want. You can make a stack of multiple lifelines into a single timing diagram. Each lifeline will represent each object of the system. -
What is the time axis in a timing diagram and where I can find it in a timing diagram example?
The time axis can be found on the x-axis of the timing diagram. It is used to show the time in different units according to need. It shows how objects change their states over time. -
Can I make a Timing Diagram using Wondershare EdrawMax?
Yes, you can make a timing diagram using Wondershare EdrawMax. You can also use pre-built timing diagrams examples from the templates community of EdrawMax.