2013年10月14日 星期一

[FWD] TimeUnit


http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeUnit.html



A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units.



這是很不錯的設計。

有時候寫程式常常忘記用 second 為單位,或者是用 millisecond 為單位。

何不讓 code 變成 oral language?

沒有留言:

張貼留言