Timer in UWP App which isn't linked to the UI

后端 未结 3 1747
灰色年华
灰色年华 2020-12-10 12:06

I\'m working on an UWP MVVM project and would like to implement an automatic logout system if the user interaction stops for a specific time.
Until now I\'m using a

3条回答
  •  情歌与酒
    2020-12-10 12:20

    You may be right at your code but I have used threadpool timer instead of dispacher timer, after referring above blog.

    If I talk about initial level I was using dispatcher timer for my app, what happens actually, it goes hang after every 2days of continuous standby. So I thought of threadpool timer as you are referring in this blog, but in threadpool it went hung in just 5-6 hours.

    So as per my experience I think dispatcher timer is more preferable than threadpool timer.

    It's just my experience of using it.

提交回复
热议问题