| 777 | }; |
| 778 | |
| 779 | void fx_callbackTimer(txSharedTimer* timer, void* refcon, txInteger refconSize) |
| 780 | { |
| 781 | txJob* job = (txJob*)refcon; |
| 782 | txMachine* the = job->the; |
| 783 | if (the) { |
| 784 | fxBeginHost(the); |
| 785 | mxTry(the) { |
| 786 | mxPushUndefined(); |
| 787 | mxPush(job->function); |
| 788 | mxCall(); |
| 789 | mxPush(job->argument); |
| 790 | mxRunCount(1); |
| 791 | mxPop(); |
| 792 | } |
| 793 | mxCatch(the) { |
| 794 | *((txSlot*)the->rejection) = mxException; |
| 795 | timer->interval = 0; |
| 796 | } |
| 797 | if (job->the) { |
| 798 | if (timer->interval == 0) { |
| 799 | fxAccess(the, &job->self); |
| 800 | *mxResult = the->scratch; |
| 801 | fxForget(the, &job->self); |
| 802 | fxSetHostData(the, mxResult, NULL); |
| 803 | job->the = NULL; |
| 804 | } |
| 805 | } |
| 806 | else |
| 807 | timer->interval = 0; |
| 808 | fxEndHost(the); |
| 809 | } |
| 810 | else |
| 811 | timer->interval = 0; |
| 812 | } |
| 813 | |
| 814 | void fx_clearTimer(txMachine* the) |
| 815 | { |
nothing calls this directly
no test coverage detected