# Collecting usage time

**URL:** https://forums.losant.com/t/collecting-usage-time/2045
**Category:** Help
**Tags:** workflow
**Created:** [August 1, 2019, 8:47pm UTC](https://forums.losant.com/t/collecting-usage-time/2045 "2019-08-01T20:47:41Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)
#### Post date: [August 2, 2019, 5:42pm UTC](https://forums.losant.com/t/collecting-usage-time/2045/5 "2019-08-02T17:42:36Z")

</div>

Hi @Lars_Andersson,

The way I would solve this is to first store the time once the value is above the threshold you set; you can store this time in workflow storage or within an attribute, whichever you prefer. Then, once the time has dipped back below the threshold, do a comparison of these times and get the difference. You can then store this time value in a device attribute, individually as one single time, or you could do a cumulative count within the attribute.

Let me know if this meets your requirements!  
Julia

---

_[View the full topic](https://forums.losant.com/t/collecting-usage-time/2045)._
