Check when the last time someone visited a specific node
The Statistics module that is part of Drupal already get that information. Its hook_exit() implementation contains the following code.

  if (variable_get('statistics_enable_access_log', 0)) {
    drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

    // For anonymous users unicode.inc will not have been loaded.
    include_once DRUPAL_ROOT . '/includes/unicode.inc';
    // Log this page access.
    db_insert('accesslog')
      -&gt;fields(array(
      'title' =&gt; truncate_utf8(strip_tags(drupal_get_title()), 255), 
      'path' =&gt; truncate_utf8($_GET['q'], 255), 
      'url' =&gt; isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', 
      'hostname' =&gt; ip_address(), 
      'uid' =&gt; $user-&gt;uid, 
      'sid' =&gt; session_id(), 
      'timer' =&gt; (int) timer_read('page'), 
      'timestamp' =&gt; REQUEST_TIME,
    ))
      -&gt;execute();
  }


The data contained in that table are reset after 72 hours. statistics_cron() contains the following code.

  // Clean up expired access logs (if applicable).
  if (variable_get('statistics_flush_accesslog_timer', 259200) &gt; 0) {
    db_delete('accesslog')
      -&gt;condition('timestamp', REQUEST_TIME - variable_get('statistics_flush_accesslog_timer', 259200), '&lt;')
      -&gt;execute();
  }


The Statistics module has a setting page (admin/config/system/statistics) that allows you to decide when the access logs are discarded; you can choose to discard then when they are older than 1 week.



The Views module has code to expose in a view the data saved from the Statistics module; you can add a field to expose the number of times a node is viewed in a view.

Alternatively, you can create a custom module basing on the Statistics module's code. In this case, you would need to implement the code for integration with the Views module, if you need it.

As side note, hook_exit() is probably going to be removed from Drupal 8; if you are using it in a Drupal 7 module, you will need to change your code when porting it to Drupal 8.