private void Run(FramePreparer framePreparer)
    {
        float time      = 0;
        float deltaTime = 1 / 90f;

        TrackedDevicePose_t[] gamePoses = new TrackedDevicePose_t[OpenVR.k_unMaxTrackedDeviceCount];
        OpenVR.Compositor.GetLastPoses(gamePoses, gamePoses);

        Vector3 headPosition = new Vector3(0, 1.5f, 1f);

        var stopwatch  = Stopwatch.StartNew();
        int frameCount = 0;

        while (true)
        {
            time += deltaTime;
            var updateParameters = new FrameUpdateParameters(time, deltaTime, gamePoses, headPosition);
            var preparedFrame    = framePreparer.PrepareFrame(updateParameters);
            preparedFrame.Dispose();

            frameCount += 1;
            if (frameCount == 100)
            {
                Console.WriteLine(stopwatch.Elapsed.TotalMilliseconds / frameCount);

                frameCount = 0;
                stopwatch.Restart();
            }
        }
    }
 private void ThreadProc()
 {
     while (true)
     {
         updateParametersReadySemaphore.Wait();
         preparedFrame = framePreparer.PrepareFrame(updateParameters);
     }
 }