we use api
int getrusage(int who, struct rusage *usage);
in Linux to calculate time in our code.
We use constant RUSAGE_THREAD as argument in this api for the calling thread. As documented on the manual page RUSAGE_THREAD was introduced since Linux 2.6.26.
we also compile our code using cywin64 gcc4.8.2 in cygwin environment. I have checked the header /usr/include/sys/resource.h in C:/cygwin64/ and I can't seem to find RUSAGE_THREAD defined there, it only has RUSAGE_SELF and RUSAGE_CHILDREN defined. I am using cygwin64 (CYGWIN_NT-6.2 1.7.29(0.272/5/3) 2014-04-07 13:46 x86_64 Cygwin). I also tried to look into latest cygwin versions and can't seem to find it there as well. So my question is, does cygwin support RUSAGE_THREAD ? If not then are there any plans to add this support ?
Thanks in advance.