{
    "Function": "_delayChangeWait",
    "File": "contracts/lib/openzeppelin-contracts/contracts/access/AccessControlDefaultAdminRules.sol",
    "Parent Contracts": [
        "contracts/lib/openzeppelin-contracts/contracts/access/AccessControl.sol",
        "contracts/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol",
        "contracts/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol",
        "contracts/lib/openzeppelin-contracts/contracts/interfaces/IERC5313.sol",
        "contracts/lib/openzeppelin-contracts/contracts/access/IAccessControlDefaultAdminRules.sol",
        "contracts/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol",
        "contracts/lib/openzeppelin-contracts/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [
        "Math"
    ],
    "Internal Calls": [
        "defaultAdminDelay",
        "defaultAdminDelayIncreaseWait"
    ],
    "Library Calls": [
        "min"
    ],
    "Low-Level Calls": [],
    "Code": "function _delayChangeWait(uint48 newDelay) internal view virtual returns (uint48) {\n        uint48 currentDelay = defaultAdminDelay();\n\n        // When increasing the delay, we schedule the delay change to occur after a period of \"new delay\" has passed, up\n        // to a maximum given by defaultAdminDelayIncreaseWait, by default 5 days. For example, if increasing from 1 day\n        // to 3 days, the new delay will come into effect after 3 days. If increasing from 1 day to 10 days, the new\n        // delay will come into effect after 5 days. The 5 day wait period is intended to be able to fix an error like\n        // using milliseconds instead of seconds.\n        //\n        // When decreasing the delay, we wait the difference between \"current delay\" and \"new delay\". This guarantees\n        // that an admin transfer cannot be made faster than \"current delay\" at the time the delay change is scheduled.\n        // For example, if decreasing from 10 days to 3 days, the new delay will come into effect after 7 days.\n        return\n            newDelay > currentDelay\n                ? uint48(Math.min(newDelay, defaultAdminDelayIncreaseWait())) // no need to safecast, both inputs are uint48\n                : currentDelay - newDelay;\n    }"
}