Datasheet
Semihosting
ARM DUI0058D Copyright © 1999-2001 ARM Limited. All rights reserved. 5-21
5.4.15 SYS_CLOCK (0x10)
Returns the number of centiseconds since the execution started.
Values returned by this SWI can be of limited use for some benchmarking purposes
because of communication overhead or other agent-specific factors. For example, with
Multi-ICE the request is passed back to the host for execution. This can lead to
unpredictable delays in transmission and process scheduling.
Use this function to calculate time intervals (the length of time some action took) by
calculating differences between intervals with and without the code sequence to be
timed
Some systems allow more accurate timing (see SYS_ELAPSED (0x30) on page 5-26
and SYS_TICKFREQ (0x31) on page 5-26).
Entry
Register r1 must contain zero. There are no other parameters.
Return
On exit, r0 contains:
• the number of centiseconds since some arbitrary start point, if the call is
successful
•–1 if the call is unsuccessful (for example, because of a communications error).
5.4.16 SYS_TIME (0x11)
Returns the number of seconds since 00:00 January 1, 1970. This is real-world time,
regardless of any ARMulator configuration.
Entry
There are no parameters.
Return
On exit, r0 contains the number of seconds.