Skip to content

Instantly share code, notes, and snippets.

@dotsquid
Created February 26, 2018 22:29
Show Gist options
  • Save dotsquid/4fd5f251d6bea38b6e5f822d5eddf129 to your computer and use it in GitHub Desktop.
Save dotsquid/4fd5f251d6bea38b6e5f822d5eddf129 to your computer and use it in GitHub Desktop.
public static IEnumerator WaitForRealTime(float delay)
{
float endTime = Time.realtimeSinceStartup + delay;
while (Time.realtimeSinceStartup < endTime)
yield return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment