Writing a function name in a normal paragraph in my dissertation
Is this a question regarding the formatting?

In this case I would use a typewriter font. In LaTeX this is simple by using \texttt:

... with the Java programming language we can use \texttt{System.nanoTime} ...


This looks similar to 


  ... with the Java programming language we can use System.nanoTime ...


In Microsoft Word, you could simply use some font, such as Courier New.

However, you should check with your supervisor if this is OK for him or her.