Class Power

    Definition

    Namespace:
    Tizen.System
    Assembly:
    Tizen.System.dll

    The Power class provides methods to control the power service.

    public static class Power
    Inheritance
    object
    Power
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Methods

    View Source

    ReleaseCpuLock()

    Releases the CPU lock state.

    Declaration
    public static void ReleaseCpuLock()
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    Tizen.System.Power.ReleaseCpuLock();
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    If the privilege is not set.

    System.InvalidOperationException

    In case of any system error.

    View Source

    RequestCpuLock(int)

    Locks the CPU for a specified time. After the given timeout (in milliseconds), unlock the given lock state automatically.

    Declaration
    public static void RequestCpuLock(int timeout)
    Parameters
    Type Name Description
    int timeout

    The positive number in milliseconds or 0 for the permanent lock. So you must release the permanent lock of the power state with ReleaseCpuLock() if timeout_ms is zero.

    Remarks

    If the process dies, then every lock will be removed.

    Examples
    Tizen.System.Power.RequestCpuLock(2000);
    Exceptions
    Type Condition
    System.ArgumentException

    When an invalid parameter value is set.

    System.UnauthorizedAccessException

    If the privilege is not set.

    System.InvalidOperationException

    In case of any system error.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX