ptimer: Add new ptimer_set_period_from_clock() function