Consider reimplmenting to use Tcl built-ins; see https://wiki.tcl-lang.org/page/timers
| 45 | // https://wiki.tcl-lang.org/page/timers |
| 46 | // |
| 47 | static int |
| 48 | startTimer(ClientData clientData, Tcl_Interp *interp, Tcl_Size argc, TCL_Char ** const argv) |
| 49 | { |
| 50 | if (theTimer == nullptr) |
| 51 | theTimer = new Timer(); |
| 52 | |
| 53 | theTimer->start(); |
| 54 | return TCL_OK; |
| 55 | } |
| 56 | |
| 57 | static int |
| 58 | stopTimer(ClientData clientData, Tcl_Interp *interp, Tcl_Size argc, TCL_Char ** const argv) |