Set the time from milliseconds.
The date part of this object will be unaffected.

@param millis  an instant to copy the time from, date part ignored
@throws IllegalArgumentException if the value is invalid
341272
public void setTime(final long millis) {
        int millisOfDay = ISOChronology.getInstanceUTC().millisOfDay().get(millis);
        setMillis(getChronology().millisOfDay().set(getMillis(), millisOfDay));
    }
766792
public static Calendar calendar(long millis) {
		final Calendar cal = Calendar.getInstance();
		cal.setTimeInMillis(millis);
		return cal;
	}
84291
private static long getTime(int year, int month, int day, int hour,
			int minute, int second, int millisecond) {
		Calendar cal = Calendar.getInstance(Util.TIME_ZONE_UTC);
		cal.set(year, month - 1, day, hour, minute, second);
		cal.set(Calendar.MILLISECOND, millisecond);
		return cal.getTimeInMillis();
	}
627312
public final void mTIME_MILLIS_FUN_NAME() throws RecognitionException {
        try {
            int _type = TIME_MILLIS_FUN_NAME;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // EventFilter.g:49:22: ( 'time-millis' )
            // EventFilter.g:49:24: 'time-millis'
            {
            match("time-millis"); 



            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
573840
public static DateTimeValue toDateTimeValue(long millisFromEpoch, TimeZone zone) {
		GregorianCalendar c = new GregorianCalendar(zone);
		c.clear();
		c.setTimeInMillis(millisFromEpoch);
		//@formatter:off
		return new DateTimeValueImpl (
			c.get(Calendar.YEAR),
			c.get(Calendar.MONTH) + 1,
			c.get(Calendar.DAY_OF_MONTH),
			c.get(Calendar.HOUR_OF_DAY),
			c.get(Calendar.MINUTE),
			c.get(Calendar.SECOND)
		);
		//@formatter:on
	}
58235
public void setDate(final Date date) {
		if (date == null) {
			setPartialDate(null, null, null);
		} else {
			Calendar cal = Calendar.getInstance();
			cal.setTime(date);
			Integer year = cal.get(Calendar.YEAR);
			Integer month = cal.get(Calendar.MONTH) + 1;
			Integer day = cal.get(Calendar.DAY_OF_MONTH);
			setPartialDate(day, month, year);
		}
	}
29621
public void setInterval(ReadableInterval interval) {
        if (interval == null) {
            throw new IllegalArgumentException("Interval must not be null");
        }
        long startMillis = interval.getStartMillis();
        long endMillis = interval.getEndMillis();
        Chronology chrono = interval.getChronology();
        super.setInterval(startMillis, endMillis, chrono);
    }
281498
@Override
    public void setValue(Object value) {
        if (value instanceof Date || value == null) {
            this.text = null;
            super.setValue(value);
        } else {
            throw new IllegalArgumentException("setValue() expected java.util.Date value, got " + value.getClass().getName());
        }
    }
617949
public void setDuration(@NotNull final Duration duration) {
        if (duration.compareTo(MAXIMUM_DURATION) > 0) {
            throw new IllegalArgumentException("The duaration has to be smaller than 23:59:59.");
        }
        super.setValue(durationToDate(duration));
    }
559909
public static GregorianCalendar millisToCalendar(long millis) {

        GregorianCalendar result = new GregorianCalendar();
        result.setTimeZone(TimeZone.getTimeZone("GMT"));
        result.setTimeInMillis((long)(Math.ceil(millis / 1000) * 1000));
        return result;
    }
1159327
private static void convertDateString(String str) {
        try {
            Date date = Utils.dateFromString(str);
            display("Date to millis: " + date.getTime());
        } catch (Exception e) {
        }
    }
1113396
public static void setTransactionTime(Date transactionTime) {
        if (transactionTime == null) {
            String msg = "The argument 'transactionTime' should not be null.";
            throw new IllegalArgumentException(msg);
        }
        Stack<Date> stack = threadLocal.get();
        if (stack == null) {
            stack = new Stack<Date>();
            threadLocal.set(stack);
        }
        stack.push(transactionTime);
    }
728348
public static Date addMilliseconds(final Date date, final int addMilliseconds)
	{
		final Calendar dateOnCalendar = Calendar.getInstance();
		dateOnCalendar.setTime(date);
		dateOnCalendar.add(Calendar.MILLISECOND, addMilliseconds);
		return dateOnCalendar.getTime();
	}
805692
public static Timer setInterval(int milliseconds, TimerCallback callback) {
		IntervalTimer interval = new IntervalTimer();
		interval.setId(nativeSetInterval(milliseconds, callback, interval));
		return interval;
	}
239741
public static void sleep(int millis) {
		long end = System.currentTimeMillis() + millis;
		boolean interrupted = Thread.interrupted();
		int remain = millis;
		while (remain > 0) {
			try {
				Thread.sleep(remain);
				break;
			} catch (InterruptedException e) {
				interrupted = true;
				remain = (int) (end - System.currentTimeMillis());
			}
		}
		if (interrupted) {
			Thread.currentThread().interrupt();
		}
	}
448144
public void setAcquireRetryDelay(long acquireRetryDelay, TimeUnit timeUnit) {
		this.acquireRetryDelayInMs = TimeUnit.MILLISECONDS.convert(acquireRetryDelay, timeUnit);
	}
1303815
public static void setTime(Calendar calendar, int hourOfDay, int minute, int second, int millisecond) {
        calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
        calendar.set(Calendar.MINUTE, minute);
        calendar.set(Calendar.SECOND, second);
        calendar.set(Calendar.MILLISECOND, millisecond);
    }