HawkTracer  0.10.0
cpu_usage.h
Go to the documentation of this file.
1 #ifndef HAWKTRACER_CPU_USAGE_H
2 #define HAWKTRACER_CPU_USAGE_H
3 
5 #include <hawktracer/ht_config.h>
6 
7 #ifdef HT_PLATFORM_FEATURE_CPU_USAGE_ENABLED
8 
10 
13 typedef struct _HT_CPUUsageContext HT_CPUUsageContext;
14 
29 
36 
48 
50 
51 #endif /* HT_PLATFORM_FEATURE_CPU_USAGE_ENABLED */
52 
53 #endif /* HAWKTRACER_CPU_USAGE_H */
#define HT_API
Defines a directive for exporting/importing symbols from DLL.
Definition: macros.h:76
#define HT_DECLS_END
Defines an end of C linkage block.
Definition: macros.h:17
HT_API HT_CPUUsageContext * ht_cpu_usage_context_create(void *process_id)
Creates a context for a CPU usage feature.
typedefHT_DECLS_BEGIN struct _HT_CPUUsageContext HT_CPUUsageContext
A forward declaration for CPU Usage context.
Definition: cpu_usage.h:13
HT_API float ht_cpu_usage_get_percentage(HT_CPUUsageContext *context)
Gets a CPU usage percentage for a process.
#define HT_DECLS_BEGIN
Defines a beginning of C linkage block.
Definition: macros.h:16
HT_API void ht_cpu_usage_context_destroy(HT_CPUUsageContext *context)
Destroys CPU Usage context.