transit-lang-cmp
transit-lang-cmp copied to clipboard
C# did "something"
https://github.com/losvedir/transit-lang-cmp/blob/cccd963fa531a40b710d940643cf12469f17c215/README.md?plain=1#L205
At one point I had a bug because I did a
stopWatch.Elapsed / 1000
by accident instead ofstopWatch.ElapsedTicks / 1000
. The former is aTimeSpan
struct instead of along
likeElapsedTicks
, so intuitively it feels like I shouldn't be able to divide it, though it did a best effort and did something to it, though I'm not quite sure what.
That is basic math like
4a / 2 = 2a
or in words 4 apples divided by 2 are 2 apples. The division does not change the fact that we have apples or in case of your "bug" a TimeSpan
.
Your desired result is in (stopWatch.Elapsed / 1000).Ticks
see dotnet.fiddle