本文整理汇总了C#中Date.GetTime方法的典型用法代码示例。如果您正苦于以下问题:C# Date.GetTime方法的具体用法?C# Date.GetTime怎么用?C# Date.GetTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Date
的用法示例。
在下文中一共展示了Date.GetTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestRunner
public TestRunner ()
{
testRunner = new Joddes.CS.TestFramework.TestRunner ();
testRunner.OnTestFinished += (test, method, time, exception) =>
{
var el = Window.Self.Document.GetElementById (method.Name);
el.className = exception == null ? "succeeded" : "failed";
el.innerHTML += " <span class=\"time\">"+time.TotalMilliseconds+" ms</span>";
if (exception != null) {
var type = exception.GetType ();
var msg = Window.Self.Document.CreateElement ("div");
msg.className = "errorMessage";
if (exception.Message != null) {
msg.innerHTML = type.FullName +": " + exception.Message;
} else {
msg.innerHTML = ""+exception;
}
el.AppendChild(msg);
}
};
testRunner.OnTestsFinished += () =>
{
var el = Window.Self.Document.GetElementById ("timer");
var date = new Date ();
var time = date.GetTime ();
long ms = time - (long)((Joddes.CS.Html5.Object)(object)Window.Self)["startTime"];
el.innerHTML = ms.ToString ();
el = Window.Self.Document.GetElementById ("timer2");
var stime = startTime.GetTime ();
ms = time - stime;
el.innerHTML = ms.ToString();
};
}