You are here

function _autologout_get_remaining_time in Automated Logout 6.4

Same name and namespace in other branches
  1. 7.4 autologout.module \_autologout_get_remaining_time()

Get the time remaining before logout.

Return value

int Number of seconds remaining.

2 calls to _autologout_get_remaining_time()
autologout_ahah_get_remaining_time in ./autologout.module
AJAX callback that returns the time remaining for this user is logged out.
autologout_create_timer in ./autologout.module
Get the timer HTML markup.

File

./autologout.module, line 569
Used to automagically log out a user after a preset time.

Code

function _autologout_get_remaining_time() {
  $timeout = _autologout_get_user_timeout();
  $time_passed = isset($_SESSION['autologout_last']) ? time() - $_SESSION['autologout_last'] : 0;
  return $timeout - $time_passed;
}