How does System.currentTimeMillis() get its time
问题 Is the method System.currentTimeMillis() implemented to make a system call to the underlying operating system in order to receive the current time? I ask since as far as I know, the method runs pretty fast, and takes as little as 6 CPU clocks, but this doesn't make sense because system calls are known to be slow. What am I missing here? 回答1: System.currentTimeMillis() does not usually require switching to kernel mode. OS provides a mechanism that allows reading current time from user mode by