Created
May 14, 2015 07:30
-
-
Save neuecc/33a4c29a2d9d6e9872e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
IEnumerator ThreeSeconds() | |
{ | |
var sw = System.Diagnostics.Stopwatch.StartNew(); | |
yield return new WaitForSeconds(3); | |
Debug.Log(sw.Elapsed.TotalMilliseconds + "ms"); | |
} | |
// 3秒でかえってくる | |
Time.timeScale = 1.0f; | |
Observable.FromCoroutine(ThreeSeconds).Subscribe(); | |
// 6秒でかえってくる | |
Time.timeScale = 0.5f; | |
Observable.FromCoroutine(ThreeSeconds).Subscribe(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment