| 388 | } |
| 389 | |
| 390 | TimeType timeToTicks_test2(const TimeType& time) |
| 391 | { |
| 392 | /* |
| 393 | * Evaluate performance using full muldiv64 all the time. |
| 394 | * In practice, this is un-necessary and the implemented solution is to |
| 395 | * only use it when an overflow would occur. |
| 396 | */ |
| 397 | return uint64_t(time) * Timer1TestSource::ticksPerUnit(unit); // 116 |
| 398 | // return muldiv(time, uint32_t(TPU::num), uint32_t(TPU::den)); // 47 |
| 399 | } |
| 400 | }; |
| 401 | |
| 402 | template <hw_timer_clkdiv_t clkdiv, typename TimeType> void testTimer1() |