{
    "Function": "setRewardsDuration",
    "File": "contracts/staking-rewards/StakingRewards.sol",
    "Parent Contracts": [
        "contracts/staking-rewards/Pausable.sol",
        "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol",
        "contracts/staking-rewards/RewardsDistributionRecipient.sol",
        "contracts/staking-rewards/Owned.sol",
        "contracts/staking-rewards/IStakingRewards.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "onlyOwner",
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner {\n        require(\n            block.timestamp > periodFinish,\n            \"Previous rewards period must be complete before changing the duration for the new period\"\n        );\n        rewardsDuration = _rewardsDuration;\n        // C4-Audit Fix for Issue # 106\n        emit RewardsDurationUpdated(_rewardsDuration);\n    }"
}