Skip to content

Commit 034831b

Browse files
committed
fix: wrong parameters in left shift when calculation duration
this closes tcunit#226
1 parent 4a48bdd commit 034831b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TcUnit/TcUnit/POUs/Functions/F_GetCpuCounterAs64bit.TcPOU

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ VAR_IN_OUT CONSTANT
1111
END_VAR]]></Declaration>
1212
<Implementation>
1313
<ST><![CDATA[CpuCounter();
14-
F_GetCpuCounterAs64bit := SHL(32, DWORD_TO_LWORD(CpuCounter.cpuCntHiDW)) + DWORD_TO_LWORD(CpuCounter.cpuCntLoDW);]]></ST>
14+
F_GetCpuCounterAs64bit := SHL(DWORD_TO_LWORD(CpuCounter.cpuCntHiDW), 32) + DWORD_TO_LWORD(CpuCounter.cpuCntLoDW);]]></ST>
1515
</Implementation>
1616
</POU>
1717
</TcPlcObject>

0 commit comments

Comments
 (0)