Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f3d9f008
Commit
f3d9f008
authored
May 08, 2022
by
Chip Davis
Committed by
Alexandre Julliard
May 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement idle time query for Mac OS.
Signed-off-by:
Chip Davis
<
cdavis5x@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6a4ff4de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
system.c
dlls/ntdll/unix/system.c
+16
-0
No files found.
dlls/ntdll/unix/system.c
View file @
f3d9f008
...
@@ -1848,6 +1848,22 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
...
@@ -1848,6 +1848,22 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
info
->
IdleTime
.
QuadPart
=
(
ULONGLONG
)
ptimes
[
CP_IDLE
]
*
10000000
/
clockrate
.
stathz
;
info
->
IdleTime
.
QuadPart
=
(
ULONGLONG
)
ptimes
[
CP_IDLE
]
*
10000000
/
clockrate
.
stathz
;
}
}
}
}
#elif defined(__APPLE__)
{
host_name_port_t
host
=
mach_host_self
();
struct
host_cpu_load_info
load_info
;
mach_msg_type_number_t
count
;
count
=
HOST_CPU_LOAD_INFO_COUNT
;
if
(
host_statistics
(
host
,
HOST_CPU_LOAD_INFO
,
(
host_info_t
)
&
load_info
,
&
count
)
==
KERN_SUCCESS
)
{
/* Believe it or not, based on my reading of XNU source, this is
* already in the units we want (100 ns).
*/
info
->
IdleTime
.
QuadPart
=
load_info
.
cpu_ticks
[
CPU_STATE_IDLE
];
}
mach_port_deallocate
(
mach_task_self
(),
host
);
}
#else
#else
{
{
static
ULONGLONG
idle
;
static
ULONGLONG
idle
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment