do not use

use it if you implements task info sender
@param mixed $startTime_LifeTimeTaskInfoTrait
768902
public function setStartTime_LifeTimeTaskInfoTrait($startTime_LifeTimeTaskInfoTrait = null)
    {
        if( is_null($startTime_LifeTimeTaskInfoTrait) )
            $startTime_LifeTimeTaskInfoTrait = microtime(true);
        $this->startTime_LifeTimeTaskInfoTrait = $startTime_LifeTimeTaskInfoTrait;
    }
434259
public static function checkApiCallLimit($firstCallWait = false)
    {
        $timeToWait = 0;
        if (static::$microtimeOfLastApiCall == null) {
            if ($firstCallWait) {
                $timeToWait = static::$timeAllowedForEachApiCall;
            }
        } else {
            $now = microtime(true);
            $timeSinceLastCall = $now - static::$microtimeOfLastApiCall;
            //Ensure 2 API calls per second
            if($timeSinceLastCall < static::$timeAllowedForEachApiCall) {
                $timeToWait = static::$timeAllowedForEachApiCall - $timeSinceLastCall;
            }
        }

        if ($timeToWait) {
            //convert time to microseconds
            $microSecondsToWait = $timeToWait * 1000000;
            //Wait to maintain the API call difference of .5 seconds
            usleep($microSecondsToWait);
        }

        static::$microtimeOfLastApiCall = microtime(true);
    }
1083437
public function setReceiveMessageWaitTimeSeconds(int $seconds = null): void
    {
        if (null == $seconds) {
            unset($this->attributes['ReceiveMessageWaitTimeSeconds']);
        } else {
            $this->attributes['ReceiveMessageWaitTimeSeconds'] = $seconds;
        }
    }
606135
void registerTaskStarted(Task task) {
        synchronized (m_activeTasks) {
            String mapKey = createMapKey(task.getTenant(), task.getTaskID());
            if (m_activeTasks.put(mapKey, task) != null) {
                m_logger.warn("Task {} registered as started but was already running", mapKey);
            }
        }
    }
722253
public function setTask($task)
    {
        $taskCode = filter_var($task, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
        if (strpos($taskCode, '-') !== false) {
            $taskCode = str_replace('-', '', $taskCode);
        }
        $taskCode = $this->project . $taskCode;
        $this->task = $taskCode;
    }
281522
public function markAsExecuted(ScheduledTask $task, \DateTime $executionDate = null)
    {
        if (empty($executionDate)) {
            $executionDate = new \DateTime();
        }

        $task->setExecutionDate($executionDate);

        $this->om->persist($task);
        $this->om->flush();
    }
1109980
protected function cacheLongTime(string $entryIdentifier, callable $callback, int $lifetime = 3600, array $tags = [])
    {
        return $this->cacheViaTrait('sfc_' . $entryIdentifier, $callback, 'cache_pagesection', $lifetime, $tags);
    }
569660
private function initRunTimeTableData(array $task, array $parseResult): bool
    {
        $runTimeTableTasks = $this->getRunTimeTable()->table;

        $min = date('YmdHi');
        $sec = strtotime(date('Y-m-d H:i'));

        foreach ($parseResult as $time) {
            $this->checkTaskQueue(false);
            $key = $this->getKey($task['rule'], $task['taskClass'], $task['taskMethod'], $min, $time + $sec);
            $runTimeTableTasks->set($key, [
                'taskClass'  => $task['taskClass'],
                'taskMethod' => $task['taskMethod'],
                'minute'     => $min,
                'sec'        => $time + $sec,
                'runStatus'  => self::NORMAL
            ]);
        }

        return true;
    }
1219057
@Override
  public void runAt(@Pin Consumer<? super Cancel> task, 
                    long time,
                    Result<? super Cancel> result)
  {
    Objects.requireNonNull(task);

    // unregister(task);

    RunAtScheduler scheduler = new RunAtScheduler(time);
    
    long now = CurrentTime.currentTime();
    long nextTime = scheduler.applyAsLong(now);

    TimerListener listener = new TimerListener(task, scheduler);

    result.ok(listener);
    
    if (nextTime <= now) {
      return;
    }
    // _timerMap.put(task, listener);
    
    listener.alarm().queueAt(nextTime);
  }
535464
protected function set_time($start_time, $end_time) {
        $start = explode(' ', $start_time);
        $end = explode(' ', $end_time);
        $this->time = $end[0] + $end[1] - $start[0] - $start[1];
    }
425308
private function _getFastLifetime($lifetime, $priority, $maxLifetime = null)
    {
        if ($lifetime <= 0) {
            // if no lifetime, we have an infinite lifetime
            // we need to use arbitrary lifetimes
            $fastLifetime = (int) (2592000 / (11 - $priority));
        } else {
            // prevent computed infinite lifetime (0) by ceil
            $fastLifetime = (int) ceil($lifetime / (11 - $priority));
        }

        if ($maxLifetime >= 0 && $fastLifetime > $maxLifetime) {
            return $maxLifetime;
        }

        return $fastLifetime;
    }
1006234
public static function postWait(TaskInfo $taskInfo, $timeout, $workerID = -1)
    {
        $server = ServerManage::getServer('main')->getSwooleServer();
        $result = $server->taskwait($taskInfo, $timeout, $workerID);
        call_user_func([$taskInfo->getTaskHandler(), 'finish'], $server, -1, $result);
        return $result;
    }
1280600
public static function init(int $taskCount = null, int $taskQueue = null)
    {
        self::$taskCount = $taskCount == null ? self::$taskCount : $taskCount;
        self::$taskQueue = $taskQueue == null ? self::$taskQueue : $taskQueue;
        self::getInstance();
        self::$instance->initTables();
    }
163594
public function timeEnd($name = null): void
    {
        $timer = $name instanceof TimerContract ? $name : $this->resolveTimerFromName($name);

        $timer->end();
    }
654966
protected void transmitPartialTask(final Task<Diff> result)
		throws TimeoutException
	{

		if (this.partCounter == 1) {

			this.result.setTaskType(TaskTypes.TASK_PARTIAL_FIRST);
			this.taskTransmitter.transmitDiff(result);

		}
		else {

			this.result.setTaskType(TaskTypes.TASK_PARTIAL);
			this.taskTransmitter.transmitPartialDiff(result);
		}
	}
330270
void setStartTime(long startTime) {
    //Making the assumption of passed startTime to be a positive
    //long value explicit.
    if (startTime > 0) {
      this.startTime = startTime;
    } else {
      //Using String utils to get the stack trace.
      LOG.error("Trying to set illegal startTime for task : " + taskid +
          ".Stack trace is : " +
          StringUtils.stringifyException(new Exception()));
    }
  }
423711
protected function printLogResult(InputInterface $input, float $startTime, int $totalFiles): void
    {
        $time = round(microtime(true) - $startTime, 2);

        $this->output->writeln('');
        $this->output->writeln('');
        $this->output->writeln('Checked ' . number_format($totalFiles) . ' files in ' . $time . ' seconds.');
        $this->output->write('<info>' . number_format($this->passed) . ' Passed</info>');
        $this->output->write(' / <fg=red>' . number_format(count($this->errors)) . ' Errors</>');
        $this->output->write(' / <fg=yellow>' . number_format(count($this->warnings)) . ' Warnings</>');
        $this->output->writeln('');

        if (!empty($this->errors) && !$input->getOption('info-only')) {
            $this->printErrors();
        }

        if (!empty($this->warnings) && !$input->getOption('info-only')) {
            $this->printWarnings();
        }

        $this->output->writeln('');
    }