| 1693 | } |
| 1694 | |
| 1695 | int |
| 1696 | getTime(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) |
| 1697 | { |
| 1698 | double time = theDomain.getCurrentTime(); |
| 1699 | |
| 1700 | // get the display format |
| 1701 | char format[80]; |
| 1702 | if (argc == 1) { |
| 1703 | // strcpy(format,"%f"); |
| 1704 | sprintf(format,"%f",time); |
| 1705 | } else if (argc == 2) { |
| 1706 | // strcpy(format,argv[1]); |
| 1707 | sprintf(format,argv[1],time); |
| 1708 | } |
| 1709 | |
| 1710 | // now we copy the value to the tcl string that is returned |
| 1711 | // sprintf(interp->result,format,time); |
| 1712 | Tcl_SetResult(interp, format, TCL_VOLATILE); |
| 1713 | return TCL_OK; |
| 1714 | } |
| 1715 | |
| 1716 | int |
| 1717 | getLoadFactor(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) |
no test coverage detected