The methods Calendar.getTimeInMillis() and Date.getTime() both return milliseconds since 1.1.1970.
For current time, you can use:
long seconds = System.currentTimeMillis() / 1000l;
The methods Calendar.getTimeInMillis() and Date.getTime() both return milliseconds since 1.1.1970.
For current time, you can use:
long seconds = System.currentTimeMillis() / 1000l;