Java.lang.System.currentTimeMillis() Method Example
JAVA.LANG.SYSTEM.CURRENTTIMEMILLIS METHOD
Copyright ?
Description
The java.lang.System.currentTimeMillis method returns the current time in milliseconds.The unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.
Declaration
Following is the declaration for java.lang.System.currentTimeMillis method
public static long currentTimeMillis()
Parameters
NA
Return Value
This method returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTCcoordinateduniversaltime.
Exception
NA
Example
The following example shows the usage of java.lang.System.currentTimeMillis method.
package com.tutorialspoint; import java.lang.*; public class SystemDemo {
public static void main(String[] args) { // returns the current time in milliseconds System.out.print("Current Time in milliseconds = "); System .out.println(System .currentTim eMillis()); } }
Let us compile and run the above program, this will produce the following result:
Current Time in milliseconds = 1349333576093
Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- date and time poco c libraries
- generated via pdf converter ju medicine
- hive functions cheat sheet by qubole
- hardware interface and protocol of data exchange with mobile beacon via
- delay time chart bpm milliseconds delay time chart bpm 1 1 1 2 1 4 1
- date and time handling in object pascal
- computer time synchronization nist
- a windows display program with millisecond accuracy university of arizona
- at07337 sam4 real time clock rtc asf programmers manual application
- exact time with milliseconds aus africa
Related searches
- java array example code
- java example code for beginners
- example of java program
- example java code hello world
- java class example code
- arraylist java exam example code
- java arraylist example code
- java get calling method name
- java reflection get method name
- system of equations example problems
- java game example code
- java main method string args