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

Function TclCommand_setTime

SRC/runtime/commands/domain/runtime.cpp:68–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68int
69TclCommand_setTime(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char ** const argv)
70{
71 assert(clientData != nullptr);
72 Domain* domain = (Domain*)clientData;
73
74 if (argc < 2) {
75 opserr << "WARNING illegal command - time pseudoTime? \n";
76 return TCL_ERROR;
77 }
78 double newTime;
79 if (Tcl_GetDouble(interp, argv[1], &newTime) != TCL_OK) {
80 opserr << "WARNING reading time value - time pseudoTime? \n";
81 return TCL_ERROR;
82 } else {
83 domain->setCurrentTime(newTime);
84 domain->setCommittedTime(newTime);
85 }
86 return TCL_OK;
87}
88
89int
90TclCommand_getTime(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char ** const argv)

Callers

nothing calls this directly

Calls 2

setCurrentTimeMethod · 0.45
setCommittedTimeMethod · 0.45

Tested by

no test coverage detected