Specifications
typedef struct
{
clock_t tms_utime;
clock_t tms_stime;
clock_t tms_cutime;
clock_t tms_cstime;
};
The structure has the following elements:
• tms_utime: the processor time charged for the execution of user instructions
• tms_stime: the processor time charged for execution by the system on behalf of the process
• tms_cutime: the sum of the values of tms_utime and tms_cutime for all child processes
• tms_cstime: the sum of the values of tms_stime and tms_cstime for all child processes
In practice, all elapsed time is accounted as system time. No time is ever attributed as user time. In
addition, no time is allocated to child processes, as child processes cannot be spawned by the HAL.
Return
If there is no system clock available, the return value is zero, and errno is set to ENOSYS.
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
• alt_ticks_per_second() on page 14-49
• gettimeofday() on page 14-72
• settimeofday() on page 14-61
• usleep() on page 14-70
• newlib Library Documentation
read()
Prototype
int read(int fd, void *ptr, size_t len)
Commonly Called By
C/C++ programs
Device drivers
Thread-safe
See description.
Available from ISR
No.
14-68
read()
NII5V2
2015.05.14
Altera Corporation
HAL API Reference
Send Feedback