[U-Boot] [PATCH] Add a command to access the system timer
    Mike Frysinger 
    vapier at gentoo.org
       
    Sat Aug 18 01:44:42 CEST 2012
    
    
  
On Friday 17 August 2012 16:57:58 Joe Hershberger wrote:
> Two sub-commands... start and get.
>  * start sets the reference.
>  * get prints out the time since the last start (in "<sec>.<msec>" format).
> If get is called without start, returns time since boot.
> Simple way to benchmark an operation: "timer
> start;<commands-to-measure>;timer get"
please add a CONFIG_CMD_xxx for this
> --- a/common/cmd_misc.c
> +++ b/common/cmd_misc.c
>
> +int do_timer(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static
> +U_BOOT_CMD(
> +	timer ,    2,    1,     do_timer,
no space between "timer" and ","
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120817/b6003cce/attachment.pgp>
    
    
More information about the U-Boot
mailing list