system_get_ns(void)

能说明一下吗?
uint64_t system_get_ns(void)
{
//extern uint32_t HAL_GetTick(void);
extern TIM_HandleTypeDef htim4;
TIM_HandleTypeDef *hHalTim = &htim4;

uint64_t ns = HAL_GetTick();
uint64_t cnt;
uint64_t reload;

cnt = __HAL_TIM_GET_COUNTER(hHalTim);
reload = __HAL_TIM_GET_AUTORELOAD(hHalTim);

ns *= 1000000;
ns += cnt * 1000000 / reload;
return ns;

}