Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to get nanosecond resolution time for particular process: (2 Items)
   
How to get nanosecond resolution time for particular process  
I am using pthread_getcpuclockid() for retrieving the thread clock id and then clock_gettime() for fetching the time 
corresponding to particular thread clock id. This gives me time in nanoseconds.

When I use clocl_getcpuclockid()- For obtaining cpu clock id for process context and then use the clock_gettime(), it 
does not return the nanosecond resolution time.

Can you please provide me in some way to get the nanosecond time for process. 
Re: How to get nanosecond resolution time for particular process  
On Wed, 2018-07-25 at 02:32 -0400, Shreyas Pophli wrote:

I am using pthread_getcpuclockid() for retrieving the thread clock id and then clock_gettime() for fetching the time 
corresponding to particular thread clock id. This gives me time in nanoseconds.

When I use clocl_getcpuclockid()- For obtaining cpu clock id for process context and then use the clock_gettime(), it 
does not return the nanosecond resolution time.


I think you need to provide a bit more information here - after all, struct timespec *always* provides tv_nsec :-)

regards
Michael
Attachment: HTML sf-attachment-mime36862 970 bytes