Pierre Angelo

Generation

generate functionWed, 05 Apr 2023

¿Cómo mostrar por pantalla el tiempo transcurrido en unity?

LARGE_INTEGER frequency; // ticks per second LARGE_INTEGER t1, t2; // ticks double elapsedTime; // get ticks per second QueryPerformanceFrequency(&frequency); // start timer QueryPerformanceCounter(&t1); // do something // stop timer QueryPerformanceCounter(&t2); // compute and print the elapsed time in millisec elapsedTime = (t2.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart; printf("Elapsed time: %f ms.\n", elapsedTime);

Questions about programming?Chat with your personal AI assistant