You are here

private static function S3fsFileMigrationBatch::getElapsedTimeFormatted in S3 File System 4.0.x

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

Formatted string of time elapsed on batch process.

Parameters

int $time_start: Time batch started as seconds since unix epoch.

Return value

string Zero padded elapsed time in "hh:mm:ss" format.

2 calls to S3fsFileMigrationBatch::getElapsedTimeFormatted()
S3fsFileMigrationBatch::finished in src/Batch/S3fsFileMigrationBatch.php
Finished batch callback.
S3fsFileMigrationBatch::getCopyOperationMessage in src/Batch/S3fsFileMigrationBatch.php
Copy Operation progress message generator.

File

src/Batch/S3fsFileMigrationBatch.php, line 250

Class

S3fsFileMigrationBatch
Batch migrate files to a S3 bucket.

Namespace

Drupal\s3fs\Batch

Code

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