# Measure long elapsed periods with Analytics Builder

**URL:** <https://community.cumulocity.com/t/measure-long-elapsed-periods-with-analytics-builder/2124>\
**Category:** Forum\
**Tags:** Streaming-Analytics-Apama, cumulocity\
**Created:** [March 11, 2023, 6:41pm UTC](https://community.cumulocity.com/t/measure-long-elapsed-periods-with-analytics-builder/2124 "2023-03-11T18:41:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nolasailing](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/nolasailing/32/9877_2.png) [@nolasailing](https://community.cumulocity.com/u/nolasailing)\
**Post date:** [March 11, 2023, 6:41pm UTC](https://community.cumulocity.com/t/measure-long-elapsed-periods-with-analytics-builder/2124/1 "2023-03-11T18:41:04Z")

</div>

#### What product/components do you use and which version/fix level are you on?

Analytics Builder 10.15

#### Is your question related to the free trial, or to a production (customer) instance?

customer

#### What are you trying to achieve? Please describe it in detail.

The customer wants to monitor, if an alarm was not achnowledged or cleared during a predefined period. Therefore, we thought about using Analytics Builder to create a new model with the Duration Block. As in the documentation for this block is written, to set the amount of time in seconds, I want to know if you see any concerns about defining a much longer elapsed time frame, like multiple weeks in seconds.

#### Do you get any error messages? Please provide a **full error** message screenshot and log file.

No, just happy about experts knowledge exchange.

#### Have you installed all the latest fixes for the products and systems you are using?

/

---

<div class="post-metadata">

**Author:** ![Harald\_Meyer](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harald_meyer/32/1959_2.png) [@Harald\_Meyer](https://community.cumulocity.com/u/Harald_Meyer)\
**Post date:** [March 13, 2023, 8:00am UTC](https://community.cumulocity.com/t/measure-long-elapsed-periods-with-analytics-builder/2124/2 "2023-03-13T08:00:02Z")

</div>

Hi Yvonne,

as Analytics Builder keeps the state in memory, it is probably not the best approach to handle such long timeouts. I would suggest to use EPL Apps as this also allows you to easily deal with existing alarms when the app starts. I can think of two options here:

- For every incoming alarm (using FindAlarm during startup and subscription later), start a listener with a timeout.
- On a schedule fetch all alarms and check if they are active for longer than expected.

Best regards,  
Harald

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [September 9, 2023, 8:00am UTC](https://community.cumulocity.com/t/measure-long-elapsed-periods-with-analytics-builder/2124/3 "2023-09-09T08:00:31Z")

</div>

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