我有这个代码:
double timeTillTick = 15.0;
private void lower_Tick(object sender, EventArgs e)
{
if (timeTillClear > 0)
{
timeTillClear -= 0.1;
clearingIn10SecondsToolStripMenuItem.Text = "Clearing in " + timeTillClear + " seconds.";
}
else
{
lower.Enabled = false;
}
}
每 100 毫秒降低一次滴答声。当它:
- 达到 8
- 达到 5
- 达到 1
它增加了0.000000000000001
。为什么?