mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 20:40:21 +08:00
Fix build error with MacOS
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
58cecdf771
commit
cee213bb95
@ -154,7 +154,7 @@ 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) ==
|
||||
if (thread_info(thread, THREAD_BASIC_INFO, static_cast<thread_info_t>(&info), &count) ==
|
||||
KERN_SUCCESS) {
|
||||
return MakeTime(info);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user