Index: vtkvis/trunk/RenderServer.cpp
===================================================================
--- vtkvis/trunk/RenderServer.cpp	(revision 6378)
+++ vtkvis/trunk/RenderServer.cpp	(revision 6383)
@@ -250,6 +250,6 @@
     g_statsFile = open(pathStr.c_str(), O_EXCL | O_CREAT | O_WRONLY, 0600);
     if (g_statsFile < 0) {
-	ERROR("can't open \"%s\": %s", pathStr.c_str(), strerror(errno));
-	return -1;
+        ERROR("can't open \"%s\": %s", pathStr.c_str(), strerror(errno));
+        return -1;
     }
     return g_statsFile;
@@ -273,19 +273,13 @@
 serverStats(int code) 
 {
-    double start, finish;
     char buf[BUFSIZ];
     Tcl_DString ds;
     int result;
-    int f;
-
-    {
-	struct timeval tv;
-
-	/* Get ending time.  */
-	gettimeofday(&tv, NULL);
-	finish = CVT2SECS(tv);
-	tv = g_stats.start;
-	start = CVT2SECS(tv);
-    }
+
+    /* Get ending time.  */
+    struct timeval now;
+    gettimeofday(&now, NULL);
+    double session_time = CVT2SECS(now) - CVT2SECS(g_stats.start);
+
     /* 
      * Session information:
@@ -326,10 +320,10 @@
     /* date */
     Tcl_DStringAppendElement(&ds, "date");
-    strcpy(buf, ctime(&g_stats.start.tv_sec));
+    strcpy(buf, ctime(&now.tv_sec));
     buf[strlen(buf) - 1] = '\0';
     Tcl_DStringAppendElement(&ds, buf);
     /* date_secs */
     Tcl_DStringAppendElement(&ds, "date_secs");
-    sprintf(buf, "%ld", g_stats.start.tv_sec);
+    sprintf(buf, "%ld", now.tv_sec);
     Tcl_DStringAppendElement(&ds, buf);
     /* num_data_sets */
@@ -359,5 +353,5 @@
     /* session_time */
     Tcl_DStringAppendElement(&ds, "session_time");
-    sprintf(buf, "%g", finish - start);
+    sprintf(buf, "%g", session_time);
     Tcl_DStringAppendElement(&ds, buf);
     /* status */
@@ -366,32 +360,32 @@
     Tcl_DStringAppendElement(&ds, buf);
     {
-	long clocksPerSec = sysconf(_SC_CLK_TCK);
-	double clockRes = 1.0 / clocksPerSec;
-	struct tms tms;
-
-	memset(&tms, 0, sizeof(tms));
-	times(&tms);
-	/* utime */
-	Tcl_DStringAppendElement(&ds, "utime");
-	sprintf(buf, "%g", tms.tms_utime * clockRes);
-	Tcl_DStringAppendElement(&ds, buf);
-	/* stime */
-	Tcl_DStringAppendElement(&ds, "stime");
-	sprintf(buf, "%g", tms.tms_stime * clockRes);
-	Tcl_DStringAppendElement(&ds, buf);
-	/* cutime */
-	Tcl_DStringAppendElement(&ds, "cutime");
-	sprintf(buf, "%g", tms.tms_cutime * clockRes);
-	Tcl_DStringAppendElement(&ds, buf);
-	/* cstime */
-	Tcl_DStringAppendElement(&ds, "cstime");
-	sprintf(buf, "%g", tms.tms_cstime * clockRes);
-	Tcl_DStringAppendElement(&ds, buf);
+        long clocksPerSec = sysconf(_SC_CLK_TCK);
+        double clockRes = 1.0 / clocksPerSec;
+        struct tms tms;
+
+        memset(&tms, 0, sizeof(tms));
+        times(&tms);
+        /* utime */
+        Tcl_DStringAppendElement(&ds, "utime");
+        sprintf(buf, "%g", tms.tms_utime * clockRes);
+        Tcl_DStringAppendElement(&ds, buf);
+        /* stime */
+        Tcl_DStringAppendElement(&ds, "stime");
+        sprintf(buf, "%g", tms.tms_stime * clockRes);
+        Tcl_DStringAppendElement(&ds, buf);
+        /* cutime */
+        Tcl_DStringAppendElement(&ds, "cutime");
+        sprintf(buf, "%g", tms.tms_cutime * clockRes);
+        Tcl_DStringAppendElement(&ds, buf);
+        /* cstime */
+        Tcl_DStringAppendElement(&ds, "cstime");
+        sprintf(buf, "%g", tms.tms_cstime * clockRes);
+        Tcl_DStringAppendElement(&ds, buf);
     }
     Tcl_DStringAppend(&ds, "\n", -1);
-    f = getStatsFile(NULL);
-    result = writeToStatsFile(f, Tcl_DStringValue(&ds), 
+    int fd = getStatsFile(NULL);
+    result = writeToStatsFile(fd, Tcl_DStringValue(&ds), 
                               Tcl_DStringLength(&ds));
-    close(f);
+    close(fd);
     Tcl_DStringFree(&ds);
     return result;
@@ -450,5 +444,5 @@
     if (g_fLog != NULL) {
         fclose(g_fLog);
-	g_fLog = NULL;
+        g_fLog = NULL;
     }
 }
Index: vtkvis/trunk/RendererCmd.cpp
===================================================================
--- vtkvis/trunk/RendererCmd.cpp	(revision 6378)
+++ vtkvis/trunk/RendererCmd.cpp	(revision 6383)
@@ -2353,18 +2353,30 @@
         objPtr = Tcl_NewStringObj(buf, -1);
         Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
+        /* date */
+        Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4));
+        strcpy(buf, ctime(&VtkVis::g_stats.start.tv_sec));
+        buf[strlen(buf) - 1] = '\0';
+        Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1));
+        /* date_secs */
+        Tcl_ListObjAppendElement(interp, listObjPtr,
+                                 Tcl_NewStringObj("date_secs", 9));
+        Tcl_ListObjAppendElement(interp, listObjPtr,
+                                 Tcl_NewLongObj(VtkVis::g_stats.start.tv_sec));
     } else {
         objPtr = Tcl_NewStringObj("render_info", 11);
         Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    /* date */
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4));
-    strcpy(buf, ctime(&VtkVis::g_stats.start.tv_sec));
-    buf[strlen(buf) - 1] = '\0';
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1));
-    /* date_secs */
-    Tcl_ListObjAppendElement(interp, listObjPtr, 
-                             Tcl_NewStringObj("date_secs", 9));
-    Tcl_ListObjAppendElement(interp, listObjPtr, 
-                             Tcl_NewLongObj(VtkVis::g_stats.start.tv_sec));
+        struct timeval now;
+        gettimeofday(&now, NULL);
+        /* date */
+        Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4));
+        strcpy(buf, ctime(&now.tv_sec));
+        buf[strlen(buf) - 1] = '\0';
+        Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1));
+        /* date_secs */
+        Tcl_ListObjAppendElement(interp, listObjPtr, 
+                                 Tcl_NewStringObj("date_secs", 9));
+        Tcl_ListObjAppendElement(interp, listObjPtr, 
+                                 Tcl_NewLongObj(now.tv_sec));
+    }
     /* Client arguments. */
     if (Tcl_ListObjGetElements(interp, objv[1], &numItems, &items) != TCL_OK) {
