如何在GWT中轻松完成以下操作? (以下代码是非法的,因为未模拟String.format
。)
long lTime = System.currentTimeMillis() % (24*60*60*1000);
long lHour = lTime/(60*60*1000);
long lMin = lTime/(60*1000)%60;
long lSec = lTime/1000%60;
long lMilli = lTime%1000;
return String.format("%d.%.2d:%.2d.%.4d", lHour, lMin, lSec, lMilli);