-
Notifications
You must be signed in to change notification settings - Fork 5.4k
NET6 - Stopwatch.ElapsedMilliseconds returns wrong result when using monoVM on linux-arm #61599
Copy link
Copy link
Closed
Labels
area-VM-meta-monountriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Description
Results seem to be 100x bigger.
Reproduction Steps
I was testing minimal Thread.Sleep() time with following program:
Stopwatch sw = new Stopwatch();
while(true)
{
sw.Restart();
Thread.Sleep(1);
sw.Stop();
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")} - Elapsed {sw.ElapsedMilliseconds}");
}
deployed with
dotnet publish -r linux-arm -p:PublishTrimmed=True -p:TrimMode=Link --self-contained true -c Release -f net6.0 -o bin\dotnet\mono -p:UseMonoRuntime=true - for monoVM
and
dotnet publish -r linux-arm -p:PublishTrimmed=True -p:TrimMode=Link --self-contained true -c Release -f net6.0 -o bin\dotnet - for default dotnet runtime
Expected behavior
Expected to return number of milliseconds elapsed.
Actual behavior
100x elapsed millisecods for mono VM.
On screenshot first part is using monoVM, second default dotnet runtime.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
Tested on 32bit linux-arm on Yocto linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-VM-meta-monountriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
