whos_online::seconds_since_first_request (public)

 whos_online::seconds_since_first_request user_id

Defined in packages/acs-tcl/tcl/whos-online-procs.tcl

Returns the number of seconds since the user with given id first requested a page. Returns the empty string if the user is not currently online.

Parameters:
user_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/shared/whos-online.tcl packages/acs-subsite/ www/shared/whos-online.tcl whos_online::seconds_since_first_request whos_online::seconds_since_first_request packages/acs-subsite/www/shared/whos-online.tcl->whos_online::seconds_since_first_request

Testcases:
No testcase defined.
Source code:
    if { [nsv_exists last_hit $user_id] } {
        return [expr {[ns_time] - [nsv_get first_hit $user_id]}]
    } else {
        return {}
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: