cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: How to track time when device is on sleep

@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.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: How to track time when device is on sleep

@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.

View solution in original post

Highlighted
Super User III
Super User III

Re: How to track time when device is on sleep

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,699)