Java Millisecond Current Get currentTimeMillis()

Here you can find the source of currentTimeMillis()

Description

Gets a reference to current time as int.

License

Open Source License

Return

a reference to current time as int.

Declaration

synchronized public static int currentTimeMillis() 

Method Source Code

//package com.java2s;
/**//from   ww  w  . j  a  va 2  s .  c  o m
 * This file is part of JEMMA - http://jemma.energy-home.org
 * (C) Copyright 2013 Telecom Italia (http://www.telecomitalia.it)
 *
 * JEMMA is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License (LGPL) version 3
 * or later as published by the Free Software Foundation, which accompanies
 * this distribution and is available at http://www.gnu.org/licenses/lgpl.html
 *
 * JEMMA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License (LGPL) for more details.
 *
 */

public class Main {
    /**
     * Gets a reference to current time as int.
     * 
     * @return a reference to current time as int.
     */
    synchronized public static int currentTimeMillis() {
        return (int) (System.currentTimeMillis() % Integer.MAX_VALUE);
    }
}

Related

  1. currentTimeMillis()
  2. currentTimeMillis()
  3. currentTimeMillis()
  4. currentTimeMillis()
  5. currentTimeMillis()
  6. currentTimeMillis()