我知道这不是“它应该工作的方式”,但仍然:如果你有两个 DateTime 对象,那么减去它们的好方法是什么?将它们转换为 Date 对象?
DateTime start = new DateTime();
System.out.println(start + " - doing some stuff");
// do stuff
DateTime end = new DateTime();
Period diff = // end - start ???
System.out.println(end + " - doing some stuff took diff seconds");