2 // Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 // Set the URL to the location of the testreport.php script
25 // (you should really set USE_RTRACE before including this file though)
26 #define USE_RTRACE
"http://localhost/testreport.php";
31 rtrace
= function (msg
)
33 last_trace_time
= getTimer
();
41 getUrl
(url
, 'report', 'POST');
44 var last_trace_time
= getTimer
();
47 // getTimer() return milliseconds, so
48 // we send the report after 1 second of inactivity
49 // and check for it every 1/2 seconds
51 var interval
= setInterval
(
53 if (getTimer
() - last_trace_time
> 1000 ) {
54 clearInterval
(interval
);