Skip to content

Commit 4dd8806

Browse files
authored
Fix Environment.TickCount64 (#2244)
1 parent 6ddc7ac commit 4dd8806

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/nanoFramework.Runtime.Native/nf_rt_native_System_Environment.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ HRESULT Library_nf_rt_native_System_Environment::get_TickCount64___STATIC__I8(CL
1010
NATIVE_PROFILE_CLR_CORE();
1111
NANOCLR_HEADER();
1212

13-
CLR_RT_HeapBlock &ref = stack.PushValue();
13+
int64_t ticksValue = CLR_RT_ExecutionEngine::GetUptime();
1414

15-
// get pointer to object pushed to the stack
16-
// and set with value from EE
17-
ref.Dereference()->NumericByRef().s8 = CLR_RT_ExecutionEngine::GetUptime();
15+
stack.SetResult_I8(ticksValue);
1816

1917
NANOCLR_NOCLEANUP_NOLABEL();
2018
}

0 commit comments

Comments
 (0)