Possible Duplicate:
System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime()
So far I've seen two ways of getting time in Java:
Calendar.getInstance().getTimeInMillis();
and
System.currentTimeMillis();
I know that the latter is UNIX time, i.e. time passed from 1970... But, when to use first and when to use second time? Thanks.