MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / getTime

Function getTime

SRC/tcl/commands.cpp:1695–1714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1693}
1694
1695int
1696getTime(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
1716int
1717getLoadFactor(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)

Callers 1

Example3.3.pyFile · 0.85

Calls 1

getCurrentTimeMethod · 0.45

Tested by

no test coverage detected