MCPcopy Create free account
hub / github.com/WheretIB/nullc / CalcThread

Function CalcThread

SuperCalc.cpp:1631–1655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1629HANDLE calcThread = INVALID_HANDLE_VALUE;
1630
1631DWORD WINAPI CalcThread(void* param)
1632{
1633 RunResult &rres = *(RunResult*)param;
1634 rres.finished = false;
1635 rres.result = false;
1636 double time = myGetPreciseTime();
1637 nullres goodRun = nullcRunFunction(NULL);
1638 rres.time = myGetPreciseTime() - time;
1639 rres.result = goodRun;
1640 if(goodRun)
1641 {
1642 const char *val = nullcGetResult();
1643
1644 SetWindowText(hResult, "Finalizing...");
1645 nullcFinalize();
1646
1647 char result[1024];
1648 _snprintf(result, 1024, "The answer is: %s [in %f]", val, runRes.time);
1649 result[1023] = '\0';
1650 SetWindowText(hResult, result);
1651 }
1652 rres.finished = true;
1653 SendMessage(rres.wnd, WM_USER + 1, 0, 0);
1654 ExitThread(goodRun);
1655}
1656
1657void RefreshBreakpoints()
1658{

Callers

nothing calls this directly

Calls 4

nullcRunFunctionFunction · 0.85
nullcGetResultFunction · 0.85
nullcFinalizeFunction · 0.85
myGetPreciseTimeFunction · 0.70

Tested by

no test coverage detected