# Timer Component Session out

**URL:** <https://community.thunkable.com/t/timer-component-session-out/564438>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [April 30, 2020, 12:39pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438 "2020-04-30T12:39:10Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rumesh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rumesh/32/68408_2.png) [@Rumesh](https://community.thunkable.com/u/Rumesh)\
**Post date:** [April 30, 2020, 12:39pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/1 "2020-04-30T12:39:10Z")

</div>

I want to disable a “button”, when click on it and enable it back after 30 seconds.  
I design it using “wait” command.  
But the “button” I mentioned above enable automatically without any time deletion when I go back to the home screen of my app or close the app.

After that I tried it by using timer component. but same thing happened. may be I didn’t set the blocks of time component correctly.

Please help me on this matter. 🙂

---

<div class="post-metadata">

**Author:** ![iqbandara11xvit](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@iqbandara11xvit](https://community.thunkable.com/u/iqbandara11xvit)\
**Post date:** [April 30, 2020, 4:39pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/2 "2020-04-30T16:39:29Z")

</div>

Did you try to store timer value as a variable?

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [April 30, 2020, 4:44pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/3 "2020-04-30T16:44:34Z")

</div>

### Hi @Rumesh, welcome to the Community.

Disabling a button when clicked would look something like this:  
[![](https://snipboard.io/YVRWuQ.jpg) ](https://snipboard.io/YVRWuQ.jpg)

You are saying you are having issues? Can you elaborate more on this or explain what happens after the button is clicked?

(edit)

### If you are changing between screens:

You can use 2 timers if you are going to be switching through screens. See below how to achieve this:

- 
### 30 Second Timer settings:

[![](https://snipboard.io/oxlPBI.jpg) ](https://snipboard.io/oxlPBI.jpg)

- 
### Check Timer settings:

[![](https://snipboard.io/qdfeQY.jpg) ](https://snipboard.io/qdfeQY.jpg)

- 
### Add these blocks to the screen in which you want to disable the button:

[![](https://snipboard.io/oTb72K.jpg) ](https://snipboard.io/oTb72K.jpg)

This works for me when switching between screens.

Let me know how you get on with this 🙂

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 30, 2020, 5:52pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/4 "2020-04-30T17:52:20Z")

</div>

CHeck this out!  
[![](https://res.cloudinary.com/behaviorreportcard/image/upload/v1588269038/Screen_Shot_2020-04-30_at_1.49.22_PM_ogsdqh.png) ](https://res.cloudinary.com/behaviorreportcard/image/upload/v1588269038/Screen_Shot_2020-04-30_at_1.49.22_PM_ogsdqh.png)

[https://x.thunkable.com/projectPage/5df3c3a9786143b77d64902a](https://x.thunkable.com/projectPage/5df3c3a9786143b77d64902a)

---

<div class="post-metadata">

**Author:** ![iqbandara11xvit](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@iqbandara11xvit](https://community.thunkable.com/u/iqbandara11xvit)\
**Post date:** [April 30, 2020, 5:54pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/5 "2020-04-30T17:54:39Z")

</div>

when app is closed does the timer still work?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 30, 2020, 5:56pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/6 "2020-04-30T17:56:28Z")

</div>

yes!

---

<div class="post-metadata">

**Author:** ![iqbandara11xvit](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@iqbandara11xvit](https://community.thunkable.com/u/iqbandara11xvit)\
**Post date:** [April 30, 2020, 6:41pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/7 "2020-04-30T18:41:46Z")

</div>

I checked the timer value by click on a button.

then i see when i go to a another screen and come back the timer get paused. after it’s continued.

how to make a timer still running while I go to a another screen?

Edit

now timer get reset when navigate through screens

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 30, 2020, 7:03pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/8 "2020-04-30T19:03:24Z")

</div>

Guess I better fix that!

Basically. You save

Seconds since 1970

Then reference how many seconds have passed since you last checked.

Divide by 60.

That’s how many minutes.

---

<div class="post-metadata">

**Author:** ![iqbandara11xvit](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@iqbandara11xvit](https://community.thunkable.com/u/iqbandara11xvit)\
**Post date:** [April 30, 2020, 7:06pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/9 "2020-04-30T19:06:22Z")

</div>

thanks and got the idea.

but problem is how to stop timer get reset when navigate through screens.

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [April 30, 2020, 7:31pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/10 "2020-04-30T19:31:47Z")

</div>

If a timer isn’t set to loop it stops after the set interval. So if your interval is 30 seconds, you start the timer, it runs for 30 seconds then stops. If you start it again its back to zero, providing count up is disabled.

---

<div class="post-metadata">

**Author:** ![iqbandara11xvit](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@iqbandara11xvit](https://community.thunkable.com/u/iqbandara11xvit)\
**Post date:** [April 30, 2020, 7:48pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/11 "2020-04-30T19:48:28Z")

</div>

tried but not worked

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [April 30, 2020, 8:08pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/12 "2020-04-30T20:08:34Z")

</div>

@jared’s example of using time since 1970 would enable you to have a makeshift timer even when the app is closed. What isn’t working for you?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 30, 2020, 8:56pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/13 "2020-04-30T20:56:07Z")

</div>

Check this out!

[https://x.thunkable.com/copy/fd09ba68db6ece489404cb3c8914b8c4](https://x.thunkable.com/copy/fd09ba68db6ece489404cb3c8914b8c4)

Just for you @iqbandara11xvit!!

---

<div class="post-metadata">

**Author:** ![iqbandara11xvit](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@iqbandara11xvit](https://community.thunkable.com/u/iqbandara11xvit)\
**Post date:** [May 2, 2020, 7:00am UTC](https://community.thunkable.com/t/timer-component-session-out/564438/14 "2020-05-02T07:00:22Z")

</div>

Dear jared,  
thank you very much for support on this matter.  
I studied your blocks and got a better idea about the concept.  
without those blocks i couldn’t solve the problem.

also thank you eoinparkinson. 🙂

 ![delay](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/3/d34b6f6ba4ed4693a32642b36b07cd6da2489301.jpeg)

---

<div class="post-metadata">

**Author:** ![Rumesh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rumesh/32/68408_2.png) [@Rumesh](https://community.thunkable.com/u/Rumesh)\
**Post date:** [May 2, 2020, 7:19am UTC](https://community.thunkable.com/t/timer-component-session-out/564438/15 "2020-05-02T07:19:16Z")

</div>

Thanks everyone for getting help on this issue.

Both jared’s and iqbandara11xvit’s solutions are worked.

😊

---

<div class="post-metadata">

**Author:** ![Rumesh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rumesh/32/68408_2.png) [@Rumesh](https://community.thunkable.com/u/Rumesh)\
**Post date:** [May 2, 2020, 7:28am UTC](https://community.thunkable.com/t/timer-component-session-out/564438/16 "2020-05-02T07:28:59Z")

</div>

HI eoinparkinson,

I tried this way. but not worked.

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 2, 2020, 11:05am UTC](https://community.thunkable.com/t/timer-component-session-out/564438/17 "2020-05-02T11:05:32Z")

</div>

Hi @Rumesh,

Apologies about that. Jared’s example should work fine for you.

---

<div class="post-metadata">

**Author:** ![Rumesh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rumesh/32/68408_2.png) [@Rumesh](https://community.thunkable.com/u/Rumesh)\
**Post date:** [May 2, 2020, 3:29pm UTC](https://community.thunkable.com/t/timer-component-session-out/564438/18 "2020-05-02T15:29:39Z")

</div>

It’s ok.  
but I got a better idea about your concept.  
thanks.  
😄

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:29am UTC](https://community.thunkable.com/t/timer-component-session-out/564438/19 "2024-11-08T11:29:32Z")

</div>


