Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- public class Accuracy : MonoBehaviour
- {
- float lastTime = 0f;
- void Awake()
- {
- StartCoroutine(MethodA());
- }
- IEnumerator MethodA()
- {
- yield return new WaitForSeconds(3.0f);
- lastTime = Time.realtimeSinceStartup;
- Debug.Log(Time.realtimeSinceStartup - lastTime);
- StartCoroutine(MethodA());
- }
- void OnApplicationQuit()
- {
- StopAllCoroutines();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement