﻿using UnityEngine;
using System.Collections;

public class Profiler : MonoBehaviour {

	public float outDeltaTime;
	public UnityEngine.UI.Text text;

	public void Update() {
		time += Time.deltaTime;
		if (time >= outDeltaTime) {
			time = 0f;
			text.text = (Time.deltaTime * 1000f).ToString() + " ms \n";
		}
	}

	float time;
}
