# Example of Using the Delay Activity

> To exemplify how you can best use the **Delay** activity, let's create an automation that writes two messages to the **Output** panel, with a delay of 20 seconds between them.

To exemplify how you can best use the **Delay** activity, let's create an automation that writes two messages to the **Output** panel, with a delay of 20 seconds between them.

1. Create a new flowchart.
2. Add a [Write Line](https://docs.uipath.com/activities/docs/write-line) activity and connect it to the **Start** node.
3. Double-click the activity, and in the **Text** field, type "This is the start time."
4. Add a **Delay** activity and connect it to the previously added activity.
5. Double-click the activity, and in the **Duration** field, enter 20 seconds (00h 00m 20.000s). This is the 20 seconds delay between the two logged messages.
6. Add another **Write Line** activity and connect it to the previously added activity.
7. In the **Text** field, type "Message delayed by 20 seconds.".
   The final project should look as in the following screenshot.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/2024-10-docs-image-168033-7a080596.webp)

8. Press F5. The automation is executed. Note that, in the **Output** panel, the two messages added in the **Write Line** activities are written twenty seconds apart.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/2024-10-docs-image-166833-57bed7b8.webp)

[Download example](https://documentationexamplerepo.blob.core.windows.net/examples/Studio_v2022.10/DelayActivity.zip)
