lkml.org 
[lkml]   [2010]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Read THREAD_CPUTIME clock from other processes.
    On Thu, 23 Dec 2010 17:21:43 +0100 Dario Faggioli wrote:

    > Trying to read CLOCK_THREAD_CPUTIME_ID of a thread from outside
    > the process that spawned it with this code:
    >
    > if (clock_getcpuclockid(tid, &clockid) != 0) {
    > perror("clock_getcpuclockid");
    > exit(EXIT_FAILURE);
    > }
    >
    > results in this:
    > ### Testing tid 24207: CPU-time clock for PID 24207 is 1.132371729 seconds
    > ### Testing tid 24209: clock_getcpuclockid: Success
    >
    > OTH, if full-fledged processes are involved, the behaviour is this:
    > ### Testing tid 24218: CPU-time clock for PID 24218 is 0.001059305 seconds
    > ### Testing tid 24220: CPU-time clock for PID 24220 is 1.044057391 seconds
    >
    > Test programs available here: http://gitorious.org/clockid.


    "DNS service for this domain has expired with DNS Made Easy" :(

    ---
    ~Randy
    *** Remember to use Documentation/SubmitChecklist when testing your code ***
    desserts: http://www.xenotime.net/linux/recipes/


    \
     
     \ /
      Last update: 2010-12-23 18:23    [W:0.033 / U:58.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site