Documentation
¶
Overview ¶
Package hint provides Go bindings for Android performance hint management.
Index ¶
- type Error
- type Manager
- type Pid_t
- type Session
- func (h *Session) APerformanceHint_reportActualWorkDuration2(workDuration *WorkDuration) error
- func (h *Session) APerformanceHint_setPreferPowerEfficiency(enabled bool) error
- func (h *Session) APerformanceHint_setThreads(threadIds *Pid_t, size uint64) error
- func (h *Session) Close() error
- func (h *Session) Pointer() unsafe.Pointer
- func (h *Session) ReportActualWorkDuration(actualDuration time.Duration) error
- func (h *Session) UpdateTargetWorkDuration(targetDuration time.Duration) error
- type WorkDuration
- func (h *WorkDuration) Close() error
- func (h *WorkDuration) Pointer() unsafe.Pointer
- func (h *WorkDuration) SetActualCpuDurationNanos(actualCpuDurationNanos int64)
- func (h *WorkDuration) SetActualGpuDurationNanos(actualGpuDurationNanos int64)
- func (h *WorkDuration) SetActualTotalDurationNanos(actualTotalDurationNanos int64)
- func (h *WorkDuration) SetWorkPeriodStartTimestampNanos(workPeriodStartTimestampNanos int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager wraps the NDK APerformanceHintManager handle.
func APerformanceHint_getManager ¶
func APerformanceHint_getManager() *Manager
APerformanceHint_getManager calls the underlying C function.
func NewManagerFromPointer ¶
NewManagerFromPointer wraps a raw APerformanceHintManager pointer.
func (*Manager) CreateSession ¶
func (h *Manager) CreateSession(threadIds *int32, size uint64, initialTargetWorkDuration time.Duration) *Session
CreateSession creates a new Session from this Manager.
func (*Manager) PreferredUpdateRateNanos ¶
PreferredUpdateRateNanos returns the value directly.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session wraps the NDK APerformanceHintSession handle.
func NewSessionFromPointer ¶
NewSessionFromPointer wraps a raw APerformanceHintSession pointer.
func (*Session) APerformanceHint_reportActualWorkDuration2 ¶
func (h *Session) APerformanceHint_reportActualWorkDuration2(workDuration *WorkDuration) error
APerformanceHint_reportActualWorkDuration2 calls the underlying NDK function.
func (*Session) APerformanceHint_setPreferPowerEfficiency ¶
APerformanceHint_setPreferPowerEfficiency calls the underlying NDK function.
func (*Session) APerformanceHint_setThreads ¶
APerformanceHint_setThreads calls the underlying NDK function.
func (*Session) ReportActualWorkDuration ¶
ReportActualWorkDuration calls the underlying NDK function.
type WorkDuration ¶
type WorkDuration struct {
// contains filtered or unexported fields
}
WorkDuration wraps the NDK AWorkDuration handle.
func NewWorkDuration ¶
func NewWorkDuration() *WorkDuration
NewWorkDuration creates a new WorkDuration.
func NewWorkDurationFromPointer ¶
func NewWorkDurationFromPointer(ptr unsafe.Pointer) *WorkDuration
NewWorkDurationFromPointer wraps a raw AWorkDuration pointer.
func (*WorkDuration) Close ¶
func (h *WorkDuration) Close() error
Close releases the underlying NDK handle.
func (*WorkDuration) Pointer ¶
func (h *WorkDuration) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.
func (*WorkDuration) SetActualCpuDurationNanos ¶
func (h *WorkDuration) SetActualCpuDurationNanos(actualCpuDurationNanos int64)
SetActualCpuDurationNanos calls the underlying NDK function.
func (*WorkDuration) SetActualGpuDurationNanos ¶
func (h *WorkDuration) SetActualGpuDurationNanos(actualGpuDurationNanos int64)
SetActualGpuDurationNanos calls the underlying NDK function.
func (*WorkDuration) SetActualTotalDurationNanos ¶
func (h *WorkDuration) SetActualTotalDurationNanos(actualTotalDurationNanos int64)
SetActualTotalDurationNanos calls the underlying NDK function.
func (*WorkDuration) SetWorkPeriodStartTimestampNanos ¶
func (h *WorkDuration) SetWorkPeriodStartTimestampNanos(workPeriodStartTimestampNanos int64)
SetWorkPeriodStartTimestampNanos calls the underlying NDK function.