本文首发于个人博客https://kezunlin.me/post/107cbcbb/,欢迎阅读! using boost.date_time to get time in millisecond microsecond level Guide format flags second millisecond microsecond nanosecond Format Flags %f Fractional seconds are always used, even when their valu…
java转换成秒数 Date类有一个getTime()可以换回秒数,例如: public class DateToSecond { public static void main(String[] args) { Date date = new Date(System.currentTimeMillis()); System.out.println(date.getTime()); } } 或者直接使用long类型存储毫秒数, long base = System.currentTimeMill…