You are here

protected static function S3fsRefreshCacheBatch::getElapsedTimeFormatted in S3 File System 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Batch/S3fsRefreshCacheBatch.php \Drupal\s3fs\Batch\S3fsRefreshCacheBatch::getElapsedTimeFormatted()

Get the elapsed time since start of the batch process.

Parameters

int $time_start: Unix timestamp of when function started.

Return value

string Elapsed time as a string format of 'hh:mm:ss'.

2 calls to S3fsRefreshCacheBatch::getElapsedTimeFormatted()
S3fsRefreshCacheBatch::finished in src/Batch/S3fsRefreshCacheBatch.php
Finished batch callback.
S3fsRefreshCacheBatch::refreshCacheOperation in src/Batch/S3fsRefreshCacheBatch.php
Batch operation callback to refresh the cached list of S3 bucket objects.

File

src/Batch/S3fsRefreshCacheBatch.php, line 196

Class

S3fsRefreshCacheBatch
Performs a refresh of the s3fs_file table with data from S3 bucket.

Namespace

Drupal\s3fs\Batch

Code

protected static function getElapsedTimeFormatted($time_start) {
  $time_elapsed_seconds = time() - $time_start;
  return gmdate('H:i:s', $time_elapsed_seconds);
}