Android Time Get getCurrentTime()

Here you can find the source of getCurrentTime()

Description

Get the current time in seconds since January 1, 1970

Return

long - see description...

Declaration

public static long getCurrentTime() 

Method Source Code

//package com.java2s;
import android.text.format.Time;

public class Main {
    private static final Time time = new Time();

    /**/*ww  w .  j a va2  s  .  co  m*/
     * Get the current time in seconds since January 1, 1970
     * 
     * @return long - see description...
     */
    public static long getCurrentTime() {
        time.setToNow();

        long now = time.toMillis(false) / 1000;

        return now;
    }
}

Related

  1. getCurrentlyDateTime()
  2. now()
  3. getTimeStamp()
  4. getTimeString(long time)
  5. getTimestamp()
  6. getCurrentTime()
  7. getCurrentTimeStamp()
  8. getNow()
  9. getNow()