```\nfunction withdrawDeposit(\n address token\n)\n external\n{\n address owner = \_getContextAccount();\n uint256 lockedUntil = deposits[owner].withdrawalLockedUntil[token];\n\n /\* solhint-disable not-rely-on-time \*/\n\n if (lockedUntil != 0 && lockedUntil <= now) {\n deposits[owner].withdrawalLockedUntil[token] = 0;\n\n address depositAccount = deposits[owner].account;\n uint256 depositValue;\n\n if (token == address(0)) {\n depositValue = depositAccount.balance;\n } else {\n depositValue = ERC20Token(token).balanceOf(depositAccount);\n }\n\n \_transferFromDeposit(\n depositAccount,\n owner,\n token,\n depositValue\n );\n\n emit DepositWithdrawn(\n depositAccount,\n owner,\n token,\n depositValue\n );\n } else {\n \_deployDepositAccount(owner);\n\n lockedUntil = now.add(depositWithdrawalLockPeriod);\n\n deposits[owner].withdrawalLockedUntil[token] = lockedUntil;\n\n emit DepositWithdrawalRequested(\n deposits[owner].account,\n owner,\n token,\n lockedUntil\n );\n }\n /\* solhint-enable not-rely-on-time \*/\n}\n```\n