| 2053 | } |
| 2054 | |
| 2055 | static kwsysProcessTime kwsysProcessTimeGetCurrent(void) |
| 2056 | { |
| 2057 | kwsysProcessTime current; |
| 2058 | kwsysProcessTimeNative current_native; |
| 2059 | #if KWSYS_C_HAS_CLOCK_GETTIME_MONOTONIC |
| 2060 | struct timespec current_timespec; |
| 2061 | clock_gettime(CLOCK_MONOTONIC, ¤t_timespec); |
| 2062 | |
| 2063 | current_native.tv_sec = current_timespec.tv_sec; |
| 2064 | current_native.tv_usec = current_timespec.tv_nsec / 1000; |
| 2065 | #else |
| 2066 | gettimeofday(¤t_native, 0); |
| 2067 | #endif |
| 2068 | current.tv_sec = (long)current_native.tv_sec; |
| 2069 | current.tv_usec = (long)current_native.tv_usec; |
| 2070 | return current; |
| 2071 | } |
| 2072 | |
| 2073 | #if defined(KWSYSPE_CLANG_DIAG_WSHORTEN) |
| 2074 | # undef KWSYSPE_CLANG_DIAG_WSHORTEN |
no outgoing calls
no test coverage detected
searching dependent graphs…