惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - zhangsir

.net 项目 调用webservice 出错,异常信息:对操作“xxx”的回复消息正文进行反序列化时出错。解决方案。 手机版web相关meta配置 网页中点击运行执行代码 js 在页面上模拟多选,蚂蚁线线框 C#导出csv文件 支持中文的解决方案 js获取url参数值 flash as2 简易手写板,带擦除功能 flash as2 BitmapData应用之 ---- 画双线 svn(版本管理) 去掉(清理)版本信息的方法 sql 数据库显示 正在恢复 as3中parent访问属性所牵涉的强制类型的问题 [AS3]URLVariables传入URL编码字符串时的一些官方无文档的原则 sql 日期 、时间相关 100万个不重复的8位的随机数 flash 中实现斜切变型 使用UpdatePanel 局部刷新出现中文乱码的解决方法!! - zhangsir - 博客园 loaded AS2 swf call function in AS3 holder - zhangsir Rewrite the master page form action attribute in asp.net 2.0 sql2000 跨服务器复制表数据
C# 检测程序运行时间的方法,Stopwatch类
zhangsir · 2013-12-20 · via 博客园 - zhangsir
//需要引用命名空间,System.Diagnostics
            Stopwatch watch = new Stopwatch();
            //实例化一个计时器
            watch.Start();
            //开始计时
            #region 即将测试的代码段
            int sum = 0;
            for (int i = 0; i < 10000; i++)
            {
                for (int j = 0; j < 10000; j++) { sum += j; }
            }
            #endregion
            watch.Stop();//结束计时
            //获取当前实例测量得出的总运行时间(以毫秒为单位)
            string time = watch.ElapsedMilliseconds.ToString();
            ///说明:Stopwatch提供了几个方法用以控制Stopwatch对象。
            ///Start方法开始一个计时操作,Stop方法停止计时。
            ///为避免这种情况,在第二次计时前用Reset方法将对象归零

posted @ 2013-12-20 11:55  zhangsir  阅读(814)  评论(0)    收藏  举报