Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am using get_cycles() in my code its return value is unsigned long, i put before function and after function then i took the deifference between two values then ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    20

    get_cycles() usage


    Hi,

    I am using get_cycles() in my code its return value is unsigned long, i put before function and after function then i took the deifference between two values then i will get one value.
    suppose i got 0x200 difference, whats the unit can i call this and whats meaning for that value

    could u please help me?
    Thanks
    Venkatesh

  2. #2
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109
    get_cycles function has return type unsigned long long and returns the value of Time Stamp Counter Register
    Precisely
    get_cycles— The resolution of get_cycles is various. The get_cycles function, which is defined all on platforms, returns a count of system clock cycles that fit into a single CPU register. Typically this is the lower half of the two 32-bit counters mentioned previously. If the processor doesn't contain a clock counter, get_cycles returns 0. get_cycles returns 0 on 486 and ARM processors.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •