MCPcopy Create free account
hub / github.com/dds-bridge/dds / EndBlockTimer

Method EndBlockTimer

library/src/system/scheduler.cpp:878–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

876
877
878void Scheduler::EndBlockTimer()
879{
880 timerBlock.End();
881 const int timeUserBlock = timerBlock.UserTime();
882
883 handType * hp;
884 for (int b = 0; b < numHands; b++)
885 {
886 hp = &hands[b];
887 int timeUser = hp->time;
888 double timesq = (double) timeUser * (double) timeUser;
889
890 if (hp->selectFlag)
891 {
892 TimeStat ts;
893 ts.Set(timeUser, timesq);
894
895 timeStrain.Add(hp->NTflag, ts);
896 timeRepeat.Add(hp->repeatNo, ts);
897 timeDepth.Add(hp->depth, ts);
898 timeStrength.Add(hp->strength, ts);
899 timeFanout.Add(hp->fanout, ts);
900 timeThread.Add(hp->thread, ts);
901 }
902
903 if (timeUser > blockMax)
904 blockMax = timeUser;
905
906 if (hp->repeatNo == 0)
907 {
908 int bin = timeUser / 1000;
909 timeHist[bin]++;
910 if (hp->NTflag)
911 timeHistNT[bin]++;
912 else
913 timeHistSuit[bin]++;
914 }
915 }
916
917 for (int g = 0; g < numGroups; g++)
918 {
919 int head = group[g].head;
920 int NTflag = (hands[head].strain == 4 ? 1 : 0);
921
922 TimeStat ts;
923
924 ts.Set(group[g].actual);
925 timeGroupActualStrain.Add(NTflag, ts);
926
927 ts.Set(group[g].pred);
928 timeGroupPredStrain.Add(NTflag, ts);
929
930 int diff = group[g].actual - group[g].pred;
931 ts.Set(diff);
932 timeGroupDiffStrain.Add(NTflag, ts);
933 }
934
935

Callers

nothing calls this directly

Calls 4

UserTimeMethod · 0.80
SetMethod · 0.80
AddMethod · 0.80
EndMethod · 0.45

Tested by

no test coverage detected