I have a Task.Delay() function.
The code activates it, and waits for 10 minutes. Works fine.
The code activates it, suppose to wait 1 hour, but it always waits more ! (more = few minutes more).
I thought it because the app enters a sleep mode, but when I lock the phone,
the app enters to a sleep mode and it works fine.
Does someone have an idea?
The device is an Android device, and I develop the app using Xamarin.Forms.
This is the code:
try{
_myTask= Task.Delay(TimeSpan.FromSeconds(secondsToWait), someTokenForCancel);
//some code.. await _myTask; }catch(TaskCanceledException e) { //some code.. }