1template<typename Rep, typename Ratio>
2printf_dur( std::chrono::duration< Rep, Ratio > dur )
3{
4 printf( "%lld ticks of %lld/%lld == %.3fs",
5 (long long int) dur.count(),
6 (long long int) Ratio::num,
7 (long long int) Ratio::den,
8 ( (Ratio::num == 1LL)
9 ? (float) dur.count() / (float) Ratio::den
10 : (float) dur.count() * (float) Ratio::num
11 )
12 );
13}
14