E
E
Explida2016-05-25 00:50:44
C++ / C#
Explida, 2016-05-25 00:50:44

How to make a timer with dynamic time on Xamarin cross platform?

Made a timer

TimeSpan interval= new TimeSpan(0, 0, 0, 0, 700);
Device.StartTimer(interval, () =>
{
        interval=TimeSpan.FromMilliseconds(interval.Milliseconds - 10);
}

but when executed, the value gets smaller and the timer itself runs at the initial interval.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#algooptimize #bottize, 2016-05-25
@user004

Probably, it is necessary not to write complete nonsense.
Interval is a local copy on the stack, not what you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question