i would like to measure time how a manually triggered update task takes and for that, I would like to access the system time. How can I do this?
i would like to measure time how a manually triggered update task takes and for that, I would like to access the system time. How can I do this?
Assuming that your target already has a working timer, and it gives resolution that suits you (millisecond ticks have become standard), it should be easy.
For a task that's manually triggered through u-boot COLI, there are commands that can be enabled which give time info. You wouldn't have to write any code. If these commands are not presently in your target's build, you would add to your board config file with #define.
From u-boot/README
See common/cmd_time.c and common/cmd_misc.c.
CONFIG_CMD_TIME example, if there is an update sequence defined in an environment variable:
If the events of start/stop are only visible in running code, you would write code yourself to call get_timer() and output result to console. The referenced source code is pretty clear.