Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Sleep in GCD with Xamarin

$
0
0

hey,

I spawn a GCD thread and I want to wait a few milliseconds. In Objectivec I would use the c function sleep() but with Xamarin.iOS I have no clue how to do that.I don't want to use a NSTimer and Thread.Sleep() seems to do not work with GCD.

here the code :

DispatchQueue.DefaultGlobalQueue.DispatchAsync (() => { Sleep(2000); });

Any idea how to do that ?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>