Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi is there another way to get api data in every x seconds without using timer? thank in advance :)

What I have tried:

 var timer = new Timer(async (e) =>
{
    await StreamCryptoData();
},null,startTimeSpan,periodTimeSpan);
Posted
Comments
F-ES Sitecore 7-Feb-18 4:36am    
Use threading and a loop that executes "sleep" or a ManualResetEvent.WaitOne.

There's nothing wrong with a timer though, so I suspect you're simply trying to solve the wrong problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900