| 134 | } |
| 135 | |
| 136 | void setThread() { |
| 137 | thread = std::this_thread::get_id(); |
| 138 | startExecTimeMs = getCurrentTimeMs(); |
| 139 | #if !defined(__APPLE__) |
| 140 | // This is a debugging feature disabled on the Mac since syscall |
| 141 | // is deprecated on that platform. |
| 142 | tid = syscall(FOLLY_SYS_gettid); |
| 143 | #endif |
| 144 | } |
| 145 | |
| 146 | void clearThread() { |
| 147 | thread = std::thread::id(); // no thread. |