how to get current time in seconds
843785Oct 7 2008 — edited Oct 9 2008Can someone please tell me how to get the current time in seconds. I am currently doing as follows but not sure if its correct or best way:
Calendar cal = new GregorianCalendar();
long currentTimeInSeconds = cal.getTimeInMillis()/1000;