wp8 入门到精通 测量代码执行时间
Stopwatch time = new Stopwatch();
byte[] target = new byte[size];
for (int j = 0; j < size; j++)
target[j] = unchecked((byte)j); //Otherwise parts of the array are optimised out.
CCMD5Core.GetHash(target);
time.Start();
for (int i = 1; i <= iterations; i++)
{
target[0] = unchecked((byte)i);
CCMD5Core.GetHash(target);
}
time.Stop();
TimeSpan ts = time.Elapsed;
// Format and display the TimeSpan value.
string elapsedTime = String.Format(CultureInfo.CurrentCulture, "Total time for core iterations: \t{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
ts.Milliseconds / 10);
Console.WriteLine(elapsedTime, "RunTime");
wp8 入门到精通 测量代码执行时间的更多相关文章
- 5、ASP.NET MVC入门到精通——NHibernate代码映射
本系列目录:ASP.NET MVC4入门到精通系列目录汇总 上一篇NHibernate学习笔记—使用 NHibernate构建一个ASP.NET MVC应用程序 使用的是xml进行orm映射,那么这一 ...
- wp8 入门到精通 虚拟标示符 设备ID
//获得设备虚拟标示符 wp8 public string GetWindowsLiveAnonymousID() { object anid = new object(); string anony ...
- wp8 入门到精通 LINQ to SQL
http://msdn.microsoft.com/zh-cn/library/bb397924.aspx LINQ 查询操作中的类型关系 (C#) 使用一个人类发明快速检索的方法 // Northw ...
- wp8 入门到精通 仿美拍评论黑白列表思路
static bool isbool = false; private void BindGameDelete() { Tile tile = new Tile(); List<Color> ...
- wp8 入门到精通 生命周期
- wp8 入门到精通 定时更新瓷贴
public class ScheduledAgent : ScheduledTaskAgent { static ScheduledAgent() { Deployment.Current.Disp ...
- wp8 入门到精通 ImageCompress 图片压缩
//实例化选择器 PhotoChooserTask photoChooserTask = new PhotoChooserTask(); BitmapImage bimg; int newPixelW ...
- wp8 入门到精通 Gallery
<Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.Resources> ...
- wp8 入门到精通 MultiMsgPrompt
List<NotifyMsg> arraymsg = new List<NotifyMsg>(); List<NotifyInfo> ArrayNotifyInfo ...
随机推荐
- python gui之tkinter语法杂记
随手写的,后续整理. 1. Entry如何调用父类的__init__? 以下错,原因后续分析 super(Your_Entry_Class, self).__init__(self,**kw) 报错: ...
- Dom初
DOM基础 •什么是DOM •浏览器支持情况 lDOM节点 •childNodes nodeType –获取子节点 <!DOCTYPE html PUBLIC "-//W3C//DT ...
- 三大UML建模工具Visio、Rational Rose、PowerDesign的区别
本文源自http://developer.51cto.com/art/201006/207993.htm UML建模工具Visio .Rational Rose.PowerDesign的比较 RO ...
- nginx服务器设置url的优雅链接
对于LNMP这样架构的网站来说,一般都是基于php框架开发,php框架一般都会讲究优雅链接,比如Laravel,CodeIgniter,ThinkPHP等都是支持这种链接模式的,在服务器配置上也叫作u ...
- delphi cxgrid 使用方法
delphi cxgrid 使用方法1.绑定数据 方法 cxGrid1DBTableView1.DataController.DataSource:=DataSource12.去掉"Drag ...
- Python~list,tuple^_^dict,set
tuple~(小括号) list~[中括号] 和list比较,dict有以下几个特点: dict~{‘key’:value,} set~set([1,2,3]) tuple一旦初始化就不能修改~指向不 ...
- 跨浏览器的事件对象-------EventUtil 中的方法及用法
什么是EventUti----封装好的事件对象 在JavaScript中,DOM0级.DOM2级与旧版本IE(8-)为对象添加事件的方法不同 为了以跨浏览器的方式处理事件,需要编写一段“通用代码”,即 ...
- mybatis,批量新增、修改,删除
转载自:http://blog.csdn.net/sanyuesan0000/article/details/19998727 最近需要用到Mybatis批量新增oracle数据库,刚开始在网上找到的 ...
- 【leetcode】Combination Sum III(middle)
Find all possible combinations of k numbers that add up to a number n, given that only numbers from ...
- 安装Django,运行django-admin.py startproject 工程名,后不出现指定的工程解决办法!!
第一次写博客,,,,, 在看我这篇教程的前提是你应该已经正确装好python和Django了,好了,废话不说了,正题走你!你现在是不是很纠结自己运行django-admin.py startpr ...