Specifications
Related Information
• alt_alarm_start() on page 14-10
• alt_alarm_stop() on page 14-11
• alt_nticks() on page 14-46
• alt_sysclk_init() on page 14-65
• alt_tick() on page 14-48
• gettimeofday() on page 14-72
• settimeofday() on page 14-61
• times() on page 14-67
• usleep() on page 14-70
alt_timestamp()
Prototype
alt_u32 alt_timestamp (void)
Commonly Called By
C/C++ programs
Thread-safe
See description.
Available from ISR
See description.
Include
<sys/alt_timestamp.h>
Description
The alt_timestamp() function returns the current value of the timestamp counter.
For more information, refer to “Using Timer Devices” in the "Developing Programs Using the Hardware
Abstraction Layer" chapter.
The implementation of this function is provided by the timestamp driver. Therefore, whether this
function is thread-safe and or available at interrupt level depends on the underlying driver.
Always call the alt_timestamp_start() function before any calls to alt_timestamp(). Otherwise the
behavior of alt_timestamp() is undefined.
Return
Returns the current value of the timestamp counter.
Related Information
• alt_timestamp_freq() on page 14-51
• alt_timestamp_start() on page 14-51
14-50
alt_timestamp()
NII5V2
2015.05.14
Altera Corporation
HAL API Reference
Send Feedback