Created
July 9, 2016 17:34
-
-
Save arashrasoulzadeh/d5bef141b4787dbea0bc4b1dec47b1d8 to your computer and use it in GitHub Desktop.
wait for real seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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