Why does TimeSpan.FromSeconds(double) round to milliseconds?

前端 未结 5 1912
悲哀的现实
悲哀的现实 2020-12-15 03:22

TimeSpan.FromSeconds takes a double, and can represent values down to 100 nanoseconds, however this method inexplicably rounds the time to whole milliseconds.

5条回答
  •  时光说笑
    2020-12-15 04:06

    I think the explanation is there: TimeSpan structure incorrectly handles values close to min and max value

    And it looks like it's not going to change any time soon :-)

提交回复
热议问题