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
d95aa67a
Commit
d95aa67a
authored
Jul 21, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdh: Add a stub processor time counter.
parent
92f843d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
pdh_main.c
dlls/pdh/pdh_main.c
+14
-0
No files found.
dlls/pdh/pdh_main.c
View file @
d95aa67a
...
...
@@ -152,21 +152,35 @@ struct source
LONGLONG
base
;
/* samples per second */
};
static
const
WCHAR
path_processor_time
[]
=
{
'\\'
,
'P'
,
'r'
,
'o'
,
'c'
,
'e'
,
's'
,
's'
,
'o'
,
'r'
,
'('
,
'_'
,
'T'
,
'o'
,
't'
,
'a'
,
'l'
,
')'
,
'\\'
,
'%'
,
' '
,
'P'
,
'r'
,
'o'
,
'c'
,
'e'
,
's'
,
's'
,
'o'
,
'r'
,
' '
,
'T'
,
'i'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
path_uptime
[]
=
{
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
' '
,
'U'
,
'p'
,
' '
,
'T'
,
'i'
,
'm'
,
'e'
,
0
};
static
void
CALLBACK
collect_processor_time
(
struct
counter
*
counter
)
{
counter
->
two
.
largevalue
=
500000
;
/* FIXME */
counter
->
status
=
PDH_CSTATUS_VALID_DATA
;
}
static
void
CALLBACK
collect_uptime
(
struct
counter
*
counter
)
{
counter
->
two
.
largevalue
=
GetTickCount64
();
counter
->
status
=
PDH_CSTATUS_VALID_DATA
;
}
#define TYPE_PROCESSOR_TIME \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | \
PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT)
#define TYPE_UPTIME \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED | PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS)
/* counter source registry */
static
const
struct
source
counter_sources
[]
=
{
{
path_processor_time
,
collect_processor_time
,
TYPE_PROCESSOR_TIME
,
-
5
,
10000000
},
{
path_uptime
,
collect_uptime
,
TYPE_UPTIME
,
-
3
,
1000
}
};
...
...
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