文章内容
2017/8/5 15:40:14,作 者: 黄兵
DateTime.Now.Ticks
单位是 100 毫微秒。表示自 0001 年 1 月 1 日午夜 12:00:00 以来已经过的时间的以 100 毫微秒为间隔的间隔数.
1 毫秒 = 10^-3 秒,
1 微秒 = 10^-6 秒,
1 毫微秒 = 10^-9 秒,
100 毫微秒 = 10^-7 秒。
using System;using System.Collections.Generic; class Sentence{ static void Main() { long ticks0 = DateTime.Now.Ticks; for (int i = 0; i < int.MaxValue; i++) { // ... } long ticks1 = DateTime.Now.Ticks; double n = (ticks1 - ticks0) / 10000000.0; Console.WriteLine("上面这段程序运行了{0}秒", n); }}
Asp.net mvc 性能优化,合并和压缩(bundle and minification)
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
评论列表