Forum Discussion
Altera_Forum
Honored Contributor
20 years agosimpler still, you can just use the timestamp feature in the HAL. See the section "High Resolution Time Measurement" in the Nios II Software Developer's Manual for a description and a code example.
Remember to set the timestamp device to be your timer in the system library properties page in the Nios II IDE.