Например. от мс до нс
Код: Выделить всё
// #1
constexpr uint64_t foo_ns = std::chrono::milliseconds(500) / std::chrono::nanoseconds>(1)
// #2
using std::chrono_literals::operator""ms;
using std::chrono_literals::operator""ns;
constexpr uint64_t foo_ns = 500ms / 1ns;
// #3
constexpr uint64_t foo_ns = std::chrono::duration_cast(
std::chrono::milliseconds(500)).count();
# 4
// Some other method
Подробнее здесь: https://stackoverflow.com/questions/791 ... ard-method