Changeset 6386 for geovis/trunk/RendererCmd.cpp
- Timestamp:
- Jun 16, 2016, 4:08:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/RendererCmd.cpp
r6385 r6386 749 749 if (Tcl_ListObjGetElements(interp, objv[1], &numItems, &items) != TCL_OK || 750 750 numItems % 2 != 0) { 751 751 return TCL_ERROR; 752 752 } 753 753 const char *username = NULL; … … 805 805 objPtr = Tcl_NewStringObj(buf, -1); 806 806 Tcl_ListObjAppendElement(interp, listObjPtr, objPtr); 807 /* date */ 808 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4)); 809 strcpy(buf, ctime(&GeoVis::g_stats.start.tv_sec)); 810 buf[strlen(buf) - 1] = '\0'; 811 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1)); 812 /* date_secs */ 813 Tcl_ListObjAppendElement(interp, listObjPtr, 814 Tcl_NewStringObj("date_secs", 9)); 815 Tcl_ListObjAppendElement(interp, listObjPtr, 816 Tcl_NewLongObj(GeoVis::g_stats.start.tv_sec)); 807 817 } else { 808 818 objPtr = Tcl_NewStringObj("render_info", 11); 809 819 Tcl_ListObjAppendElement(interp, listObjPtr, objPtr); 810 } 811 /* date */ 812 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4)); 813 strcpy(buf, ctime(&GeoVis::g_stats.start.tv_sec)); 814 buf[strlen(buf) - 1] = '\0'; 815 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1)); 816 /* date_secs */ 817 Tcl_ListObjAppendElement(interp, listObjPtr, 818 Tcl_NewStringObj("date_secs", 9)); 819 Tcl_ListObjAppendElement(interp, listObjPtr, 820 Tcl_NewLongObj(GeoVis::g_stats.start.tv_sec)); 820 struct timeval now; 821 gettimeofday(&now, NULL); 822 /* date */ 823 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4)); 824 strcpy(buf, ctime(&now.tv_sec)); 825 buf[strlen(buf) - 1] = '\0'; 826 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1)); 827 /* date_secs */ 828 Tcl_ListObjAppendElement(interp, listObjPtr, 829 Tcl_NewStringObj("date_secs", 9)); 830 Tcl_ListObjAppendElement(interp, listObjPtr, 831 Tcl_NewLongObj(now.tv_sec)); 832 } 821 833 /* client items */ 822 834 for (int i = 0; i < numItems; i++) {
Note: See TracChangeset
for help on using the changeset viewer.