std::chrono::system_clock::time_point start = std::chrono::system_clock::now();
int jj = 0;
for (int i = 0; i < 100000000; i++)
{
if (i%2 == 0)
{
jj -= i;
}
else
{
jj += i;
}
}
double tt= std::chrono::duration_cast<std::chrono::milliseconds>
(std::chrono::system_clock::now() - start).count();
printf("%f, %d\n", tt, jj);
C++的debug运行时间约是release的3倍
double currentTime = System.DateTime.Now.TimeOfDay.TotalMilliseconds;
int jj = 0;
for (int i = 0; i < 100000000; i++)
{
if (i%2 == 0)
{
jj -&