Miss clock_gettime

845767657 at qq.com 845767657 at qq.com
Sat Apr 7 06:28:31 UTC 2018


Hello,
I want to lean what's the python time.time do?
Using strace, I cannot find anything about time system call.
so I write a simple C snippet that just call clock_gettime(2), but
also strace didn't trace it.

---------------------
#include <unistd.h>
#include <time.h>

int main()
{
    struct timespec ts;
    clock_gettime(CLOCK_REALTIME, &ts);
    return 0;
}
-----------------------


$ strace -V
strace -- version 4.21
Copyright (c) 1991-2018 The strace developers <https://strace.io>.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Optional features enabled: stack-unwind stack-demangle m32-mpers mx32-mpers

$ uname -a
Linux taoqy-PC 4.15.10-1-ARCH #1 SMP PREEMPT Thu Mar 15 12:24:34 UTC 2018 x86_64 GNU/Linux


Thanks




More information about the Strace-devel mailing list