<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

function sess_update() {
    $CI = & get_instance();
    if ($CI->load->is_loaded('session') && ($CI->session->userdata('last_activity') < time() - 300)) {
        $CI->session->set_userdata('last_activity', time());
    }
}