Function calcDuration

Synopsis

#include <Source/Falcor/Utils/Timing/CpuTimer.h>

static double calcDuration(TimePoint start, TimePoint end)

Description

Calculate the duration in milliseconds between 2 time points

Source

Lines 68-73 in Source/Falcor/Utils/Timing/CpuTimer.h.

static double calcDuration(TimePoint start, TimePoint end)
{
    auto delta = end.time_since_epoch() - start.time_since_epoch();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(delta);
    return duration.count() * 1.0e-6;
}





Add Discussion as Guest

Log in to DocsForge