Skip to content

Commit

Permalink
fix: wrong parameters in left shift when calculation duration
Browse files Browse the repository at this point in the history
this closes tcunit#226
  • Loading branch information
stefanbesler committed Nov 30, 2023
1 parent 4a48bdd commit 034831b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TcUnit/TcUnit/POUs/Functions/F_GetCpuCounterAs64bit.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ VAR_IN_OUT CONSTANT
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[CpuCounter();
F_GetCpuCounterAs64bit := SHL(32, DWORD_TO_LWORD(CpuCounter.cpuCntHiDW)) + DWORD_TO_LWORD(CpuCounter.cpuCntLoDW);]]></ST>
F_GetCpuCounterAs64bit := SHL(DWORD_TO_LWORD(CpuCounter.cpuCntHiDW), 32) + DWORD_TO_LWORD(CpuCounter.cpuCntLoDW);]]></ST>
</Implementation>
</POU>
</TcPlcObject>

0 comments on commit 034831b

Please sign in to comment.