Skip to content

Instantly share code, notes, and snippets.

@arashrasoulzadeh
Created July 9, 2016 17:34
Show Gist options
  • Save arashrasoulzadeh/d5bef141b4787dbea0bc4b1dec47b1d8 to your computer and use it in GitHub Desktop.
Save arashrasoulzadeh/d5bef141b4787dbea0bc4b1dec47b1d8 to your computer and use it in GitHub Desktop.
wait for real seconds
public static IEnumerator WaitForRealSeconds(float time)
{
float start = Time.realtimeSinceStartup;
while (Time.realtimeSinceStartup < start + time)
{
yield return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment