getValues(['turntime', 'turnterm', 'year', 'startyear', 'month', 'isunited']); $reqGameLock = $admin['isunited'] != 2 && !$ignoreLock; $locked = false; if($reqGameLock){ for ($i = 0; $i < 5; $i++) { $locked = tryLock(); if ($locked) { break; } usleep(500000); } if (!$locked) { return 'server busy'; } } else{ $locked = tryLock(); } if($turnterm == $admin['turnterm']){ if($locked){ unlock(); } return null; } $oldClock = GameClock::fromStorage($gameStor); $currentTick = $oldClock->nowTick(); $currentDisplay = $oldClock->tickToDateTime($currentTick); $oldClock->persistTick($gameStor, $currentTick); $gameStor->turnterm = $turnterm; $gameStor->clock_base_time = TimeUtil::format( GameClock::baseTimeForProjection($currentDisplay, $currentTick, $turnterm), true, ); pushGlobalHistoryLog(["★턴시간이 {$turnterm}분으로 변경됩니다."]); if($locked){ unlock(); } return null; } }