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

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - 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)    收藏  举报