Skip to contentSkip to conversation

get_timer documentation

U-Boot-Users Massimiliano Cialdi 2 participants 2 messages Nov 17, 2004

lore
Share & tools
lore
#0 lore raw

We use coldfire 5282

We need to know what is the parameter and return value of get_timer()

we wnat to use get_timer() to calculate time intervals in millisecond.

something like:

....
a = get_timer(0);
/* do something */
b = get_timer(0);
....

in this case what is the measure unit of b-a?
How can I obtain millisicends?

thanks

Signature · 3 lines
Massimiliano Cialdi
cialdi at firenze.net
m.cialdi at oksys.it
#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

We use coldfire 5282

We need to know what is the parameter and return value of get_timer()

Maybe having a short look in the source code brings some ideas?

Quoted 1 line

we wnat to use get_timer() to calculate time intervals in millisecond.

Yea, that's what it's intended for.

Quoted 9 lines

something like:

....
a = get_timer(0);
/* do something */
b = get_timer(0);
....

in this case what is the measure unit of b-a?

milliseconds.

And why not simply:

	a = get_timer(0);
	/* do something */
	millisecs = get_timer(a);

???

Quoted 1 line

How can I obtain millisicends?

I don't know. What's a sicend?

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An expert is a person who avoids the small errors while  sweeping  on
to the grand fallacy.