Hi,
i need some deeper tools to profile my c# script’s. I still use the profiler from unity, but i need more timer profils.
I want to use Time.time, but this only get’s the time for a single frame. I need something like GetTickCount in Dos/Windows.
Has anybody a solution to get the tick count from the iphone sdk through a iphone plugin?
I guess i need something like this:
somewhere.mm:
#include "time.h"
extern "c"
{
float GetTickCount() { return clock() / CLOCKS_PER_SEC; }
}
somewhere.cs:
using UnityEngine;
using System.Collections;
public class Somewhere : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
float start = GetTickCount();
// do something
float end = GetTickCount();
Debug.Log( "update of somwhere: " + end - start );
}
}
Thanks, Horst