{
    "Function": "_addDelta",
    "File": "src/Drips.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "_cycleOf"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _addDelta(\n        mapping(uint32 => AmtDelta) storage amtDeltas,\n        uint256 timestamp,\n        int256 amtPerSec\n    ) private {\n        unchecked {\n            // In order to set a delta on a specific timestamp it must be introduced in two cycles.\n            // These formulas follow the logic from `_drippedAmt`, see it for more details.\n            int256 amtPerSecMultiplier = int256(_AMT_PER_SEC_MULTIPLIER);\n            int256 fullCycle = (int256(uint256(_cycleSecs)) * amtPerSec) / amtPerSecMultiplier;\n            // slither-disable-next-line weak-prng\n            int256 nextCycle = (int256(timestamp % _cycleSecs) * amtPerSec) / amtPerSecMultiplier;\n            AmtDelta storage amtDelta = amtDeltas[_cycleOf(uint32(timestamp))];\n            // Any over- or under-flows are fine, they're guaranteed to be fixed by a matching\n            // under- or over-flow from the other call to `_addDelta` made by `_addDeltaRange`.\n            // This is because the total balance of `Drips` can never exceed `type(int128).max`,\n            // so in the end no amtDelta can have delta higher than `type(int128).max`.\n            amtDelta.thisCycle += int128(fullCycle - nextCycle);\n            amtDelta.nextCycle += int128(nextCycle);\n        }\n    }"
}