Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

At first I want to let you know that this question is not related with What is native implementation in Java. I got many useful information from that thread.

I want to know that are the codes of the native implementations available? I have jdk source code but I can not find the native codes for System.currentTimeMillis or Runtime.getRuntime().availableProcessors() or other native method.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
151 views
Welcome To Ask or Share your Answers For Others

1 Answer

Yes, see os::javaTimeMillis in /src/os/solaris/vm/os_solaris.cpp to see the Solaris implementation for instance.

There are a few layers of wrappers to get there though, see JVM_CurrentTimeMillis in /src/share/vm/prims/jvm.cpp


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...