You are here

function _password_policy_get_time_per_active_clock in Password Policy 7

Gets time according to the active clock.

The system clock is active by default. The test clock is active when a test is being executed.

Parameters

int $time: A time in seconds since the Unix epoch.

Return value

int The same time according to the active clock.

3 calls to _password_policy_get_time_per_active_clock()
_password_policy_get_current_time in ./password_policy.time.inc
Gets current time.
_password_policy_get_request_time in ./password_policy.time.inc
Gets request time.
_password_policy_get_user_time in ./password_policy.time.inc
Gets time for user by user object property name.

File

./password_policy.time.inc, line 85
Password Policy time retrieval functions.

Code

function _password_policy_get_time_per_active_clock($time) {
  if (_password_policy_is_running_test()) {
    return _password_policy_get_time_per_test_clock($time);
  }
  return $time;
}