Bad usage of typename
and there's a missing closing >
in your template. Here is a tweaked example to test compilation :
template <typename T, typename R>
std::chrono::duration<T, R> getStepTime()
{
std::chrono::duration<T, R> duration;
return std::chrono::duration_cast<std::chrono::duration<T, R>>(duration);
}