We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db2d1cd commit 195010bCopy full SHA for 195010b
Uml.Robotics.Ros.MessageBase/TimeData.cs
@@ -32,7 +32,7 @@ public TimeSpan ToTimeSpan()
32
33
public static TimeData FromTicks(long ticks)
34
{
35
- long seconds = (((long)Math.Floor(1.0 * ticks / TimeSpan.TicksPerSecond)));
+ long seconds = (long)Math.Floor(ticks / (double)TimeSpan.TicksPerSecond);
36
long nanoseconds = 100 * (ticks % TimeSpan.TicksPerSecond);
37
return new TimeData((int)seconds, (int)nanoseconds);
38
}
0 commit comments