mirror of https://github.com/google/benchmark.git
Fix warning with MacOS (#1276)
* Fix warning with MacOS
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
* Re-trigger GitHub actions
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
* Fix style
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
* Revert "Fix style"
This reverts commit 1d5fe9ce87
.
* Fix style only on changes
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
4b99670c57
commit
431abd149f
|
@ -154,8 +154,9 @@ double ThreadCPUUsage() {
|
|||
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
|
||||
thread_basic_info_data_t info;
|
||||
mach_port_t thread = pthread_mach_thread_np(pthread_self());
|
||||
if (thread_info(thread, THREAD_BASIC_INFO, (thread_info_t)&info, &count) ==
|
||||
KERN_SUCCESS) {
|
||||
if (thread_info(thread, THREAD_BASIC_INFO,
|
||||
reinterpret_cast<thread_info_t>(&info),
|
||||
&count) == KERN_SUCCESS) {
|
||||
return MakeTime(info);
|
||||
}
|
||||
DiagnoseAndExit("ThreadCPUUsage() failed when evaluating thread_info");
|
||||
|
|
Loading…
Reference in New Issue