cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Adi1607
Frequent Visitor

How to track time when device is on sleep

I am tracking time with my app. When the user clicks on the complete button the time is recorded for that task. Currently, I have kept the device on never sleep mode so that the time control does not pause. Do you have any alternate way to track the time even if the device is on sleep mode?

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Adi1607 

I believe you might want to look at the approach of just recording the time at which you start.  Then at any other point where you are needing to determine the elapsed time, you can just do a datadiff on the stored starting time and Now().

Might be easier to look at it that way rather than to deal with a timer running in sleep mode (which you'll not get).

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

2 REPLIES 2
RandyHayes
Super User III
Super User III

@Adi1607 

I believe you might want to look at the approach of just recording the time at which you start.  Then at any other point where you are needing to determine the elapsed time, you can just do a datadiff on the stored starting time and Now().

Might be easier to look at it that way rather than to deal with a timer running in sleep mode (which you'll not get).

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

eka24
Super User III
Super User III

I don't think it necessary to keep your device opened. The users device will be different from yours. I suggest when the user click, the time should be saved into a Datasource.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (54,816)