# Gatling pace usage

**URL:** <https://community.gatling.io/t/gatling-pace-usage/7918>\
**Category:** Gatling (Open-Source)\
**Created:** [May 5, 2023, 9:34pm UTC](https://community.gatling.io/t/gatling-pace-usage/7918 "2023-05-05T21:34:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Banu](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Banu](https://community.gatling.io/u/Banu)\
**Post date:** [May 5, 2023, 9:34pm UTC](https://community.gatling.io/t/gatling-pace-usage/7918/1 "2023-05-05T21:34:34Z")

</div>

I am new to Gatling, Can someone please advise me if Gatling pace can be used to refresh the token periodically in the virtual user?

> **[Scenario](https://gatling.io/docs/gatling/reference/current/core/scenario/)**
>
> How to define scenarios that your virtual users will execute. Use exec to attach a chain or execute a request or a function. Use loops such as repeat, during and asLongAs. Use conditions like doIf and randomSwitch. Uses pauses.

pace  
You could want to control how frequently an action is executed, to target iterations per time type volumes. Gatling supports a dedicated type of pause: pace, which adjusts its wait time depending on the elapsed time since the virtual user last reached this action. E.g.:

**forever(  
pace(5)  
.exec(  
// will be run every 5 seconds, irrespective of what pause time is used  
pause(1, 4)  
)  
)**

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [May 6, 2023, 8:53am UTC](https://community.gatling.io/t/gatling-pace-usage/7918/2 "2023-05-06T08:53:23Z")

</div>

No. Pace blocks the flow of the virtual user in a loop.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/b/b148e0742de35c6280726cabf3ecd3de2d320f63.png) [@system](https://community.gatling.io/u/system)\
**Post date:** [June 5, 2023, 8:53am UTC](https://community.gatling.io/t/gatling-pace-usage/7918/3 "2023-06-05T08:53:43Z")

</div>

Closed on June 5, 2023, 8:53am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
