task - getting system time in Vxworks -


is there anyways system time in vxworks besides tickget() , tickannounce? want measure time between task switches of specified task think precision of tickget() not enough because the 2 tickget() values @ beggining , end of taskswitchhookadd function same!

if looking try , time task switches, assume need timer @ least @ microsecond (us) level.

usually, timers/clocks fine grained provided platform running on. if working on embedded system, can try , read thru manuals board support package (if there one) see if there functions provided access various timers on board.

a more low level solution figure out processor running on system , write simple assembly code poll processor's internal timebase register (tbr). might require bit of research on processor running on, done. if running on ppc based processor, can use code below read tbr:

loop: mftbu rx #load significant half tbu mftbl ry #load least significant half tbl mftbu rz #load tbu again cmpw rz,rx #see if 'old' = 'new' bne loop #repeat if 2 values read tbu unequal 

source: http://www-inteng.fnal.gov/integrated_eng/goodwindocs/pdf/sys%20docs/powerpc/powerpc%20elapsed%20time.pdf

good luck!


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -