Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3046

Time related

$
0
0
Hello,

Im trying to come up with code for measuring the total time.

If a pixel takes lets say a 1 millisec to do some calculation, whatabout the n pixels.


But I want to display that in the format of, scaledNow kind of format

Code:

  auto start = std::chrono::steady_clock::now();

  sleep(1);

  auto actualNow = std::chrono::steady_clock::now();
  auto timePassed = actualNow - start;
  auto timePassedScaled = timePassed * 2.0;
  auto scaledNow = start + timePassedScaled;

Thanks
pdk

Viewing all articles
Browse latest Browse all 3046

Trending Articles