|
@@ -106,22 +106,25 @@ function ratio_update(&$quit)
|
|
while (!$quit)
|
|
while (!$quit)
|
|
{
|
|
{
|
|
Log::record("ratio_update start calc quit =" . strbool($quit),Log::DEBUG);
|
|
Log::record("ratio_update start calc quit =" . strbool($quit),Log::DEBUG);
|
|
-
|
|
|
|
- for ($i = 0; $i < 61; $i++) {
|
|
|
|
- $cur_time = time();
|
|
|
|
- $time_sec = $cur_time;
|
|
|
|
- $next_min = $time_sec - $time_sec % 60;
|
|
|
|
-
|
|
|
|
- if($quit) break;
|
|
|
|
- if($next_min > $cur_min && $time_sec % 60 == 3) {
|
|
|
|
- $cur_min = $next_min;
|
|
|
|
- break;
|
|
|
|
- } else {
|
|
|
|
- Log::record("ratio_update start sleep",Log::DEBUG);
|
|
|
|
- Swoole\Coroutine::sleep(1);
|
|
|
|
- Log::record("ratio_update end sleep",Log::DEBUG);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ Log::record("ratio_update start sleep",Log::DEBUG);
|
|
|
|
+ Swoole\Coroutine::sleep(1);
|
|
|
|
+ Log::record("ratio_update end sleep",Log::DEBUG);
|
|
|
|
+
|
|
|
|
+// for ($i = 0; $i < 61; $i++) {
|
|
|
|
+// $cur_time = time();
|
|
|
|
+// $time_sec = $cur_time;
|
|
|
|
+// $next_min = $time_sec - $time_sec % 60;
|
|
|
|
+//
|
|
|
|
+// if($quit) break;
|
|
|
|
+// if($next_min > $cur_min && $time_sec % 60 == 3) {
|
|
|
|
+// $cur_min = $next_min;
|
|
|
|
+// break;
|
|
|
|
+// } else {
|
|
|
|
+// Log::record("ratio_update start sleep",Log::DEBUG);
|
|
|
|
+// Swoole\Coroutine::sleep(1);
|
|
|
|
+// Log::record("ratio_update end sleep",Log::DEBUG);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
|
|