如何在几分钟内确定两个timeMillis
之间的差异?
我的伪代码是:
long a = System.currentTimeMillis();
long b = MyClass.getPreviusTimeMillis();
double minutes = a - b = ?
答案 0 :(得分:5)
var doc = XDocument.Parse(xml);
foreach (var book in doc.Descendants("book"))
{
Console.WriteLine("Title: {0}", (string) book.Element("title"));
Console.WriteLine("ISBN: {0}", (string) book.Attribute("ISBN"));
Console.WriteLine("Price: {0}", (decimal) book.Element("price"));
Console.WriteLine("---");
}
答案 1 :(得分:1)
分钟差异:double d = (a - b)/60000.0