There is no mention of "thread synchronization" in the python documentation. Either the clock is system-wide, or system-wide. In particular, time.clock measures the time of a process, and time.time returns the system time.
In python3.3, the timing APIs have been revised and improved, but still I don't see a single timer that will return the process time spent by a single thread.
Also note that even if possible, it is not at all easy to write such a timer. Timers are OS specific, so you will need to write a different version of the module for each OS. If you want to profile a specific action, just run it without threads. When streaming time, it either works as expected, or it is much slower due to the OS, in which case you can not do anything about it (at least if you do not want to write a patch that "fixes", GIL or removes it safely).
source share