News and Discussions > Site News

Most Time Online

<< < (11/12) > >>

Marlin:
I do leave myself logged onto NukeWorker and scan periodically for new posts that would explain a lot. Not that I have not spent plenty of time in discussions.

Rennhack:

--- Quote from: Rennhack on Feb 23, 2005, 07:40 ---It only counts 10 minutes from the last activity.
It started counting when we upgraded to the SMF software (about a year ago ~400 days I'd guess.
It just counts the time you are active, and keeps counting, 1 hr is 60 active minutes, its a running total.

--- End quote ---

2nd post on the first page.  However, it's not 100% accurate, the code below is EXACTLY what happens.


--- Code: ---  // Mark your session as being logged.
  $_SESSION['log_time'] = time();

  // Well, they are online now.
  if (empty($_SESSION['timeOnlineUpdated']))
    $_SESSION['timeOnlineUpdated'] = time();

  // Set their login time, if not already done within the last minute.
  if (SMF != 'SSI' && !empty($user_info['last_login']) && $user_info['last_login'] < time() - 60)
  {
    // Don't count longer than 15 minutes.
    if (time() - $_SESSION['timeOnlineUpdated'] > 60 * 15)
      $_SESSION['timeOnlineUpdated'] = time();

    $user_settings['totalTimeLoggedIn'] += time() - $_SESSION['timeOnlineUpdated'];
    updateMemberData($ID_MEMBER, array('lastLogin' => time(), 'memberIP' => '\'' . $user_info['ip'] . '\'', 'memberIP2' => '\'' . $_SERVER['BAN_CHECK_IP'] .

    if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2)
      cache_put_data('user_settings-' . $ID_MEMBER, $user_settings, 60);

    $user_info['total_time_logged_in'] += time() - $_SESSION['timeOnlineUpdated'];
    $_SESSION['timeOnlineUpdated'] = time();
  }
--- End code ---

It's basically this:

-You access the forum (and are already logged in)
---Your total time does not go up
-You then access a thread 5 minutes later
---Your total time goes up by 5 minutes
-You then access a thread 30 seconds later
---You total time does not go up (less than 60 seconds from the last time update)
-You then access a thread 45 seconds later
---Your total time goes up by 75 seconds (30 + 45 = 75 seconds, which is more than 60 seconds, which means your time goes up).
-You then access a thread 16 minutes later
---Your total time does not go up (the limit is 15 minutes between actions, at this point, you've started a new "session").
-You then access a thread 7 minutes later
---Your total time goes up by 7 minutes.

TLDR;

So, one click >1 min and <15 min from the last click adds time.

Marlin:

--- Quote from: Rennhack on May 10, 2016, 07:21 ---2nd post on the first page.  However, it's not 100% accurate, the code below is EXACTLY what happens.

--- End quote ---

I liked NN's description better I didn't need calculus and a super computer to figure it out.  ;D

Rennhack:

--- Quote from: Rennhack on May 10, 2016, 07:21 ---
So, one click >1 min and <15 min from the last click adds time.

--- End quote ---

Rennhack:
I think about Dave often, and the contributions he made to the site.  Here is another reminder. Oh, and Nuclear NASCAR overcame Mike McFarlin, but they are still fairly neck n neck.



HydroDave63    157d 13h 31m
Marlin    142d 20h 58m
RDTroja    101d 12h 52m
GLW    97d 1h 51m
Rennhack    76d 14h 9m
Nuclear NASCAR    70d 2h 6m
Mike McFarlin    70d 1h 41m
Gamecock    64d 8h 26m
UncaBuffalo    61d 11h 32m
Drayer    52d 22h 58m

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version