Is there a property to reset timer

조회 수: 3 (최근 30일)
Gaurav Joshi
Gaurav Joshi 2023년 10월 22일
답변: Voss 2023년 10월 22일
Hello Everyone,
I am trying to use a timer to generate an autologout functionality in my app.
The app shall auto logout if there is no activity within 60 seconds.
Now, I need to have a mechanism to reset the timer, when any key is pressed.
For that I am currently, stopping a timer & then starting it again using stop(app.t) and start(app.t).
But is there any provision in matlab for reset(app.t) such that it resets to 0 value and start again.
Just for understanding, if no key is pressed, the timer is a delay timer & upon completion of requsiite delay,
it shall execute inactive logout function.
Regards,
Gaurav

채택된 답변

Voss
Voss 2023년 10월 22일
I think stop() then start(), like you've done, is the best way.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by