Sets time by using milli seconds from epoch.
@param millis
172650
public void setMillis(long millis)
    {
        ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneOffset.UTC);
        set(zonedDateTime);
    }
360213
public static Timer setTimeout(int milliseconds, TimerCallback callback) {
		TimeoutTimer timeout = new TimeoutTimer(); 
		timeout.setId(nativeSetTimeout(milliseconds, callback, timeout));
		return timeout;
	}
233585
public void setCacheMinutes(int iMinutes)
    {
        if (iMinutes == -1)
            iMinutes = DEFAULT_CACHED_MINUTES;      // Default cache time.
        cacheMinutes = iMinutes;
        if (iMinutes == 0)
        {
            if (timerCache != null)
            {
                timerCache.cancel();
                timerCache = null;
                this.stopCache();
            }
        }
        else
        {
            if (timerCache != null)
            {
                timerCache.cancel();   //m_timerCache.setDelay(iMilliseconds);
            }
          // Set up the timer for the first time.
            this.startCache();
            timerTask = new DBTimerTask();
            timerCache = new java.util.Timer();
            timerCache.schedule(timerTask, cacheMinutes * 60 * 1000);
        }
    }
301074
private void init(final long qty, final TimeUnit unit) {
        long millis = unit.convert(qty);
        seconds = TimeUnit.MILLISECOND.convert(millis, TimeUnit.SECOND) % 60;
        minutes = TimeUnit.MILLISECOND.convert(millis, TimeUnit.MINUTE) % 60;
        hours = TimeUnit.MILLISECOND.convert(millis, TimeUnit.HOUR) % 24;
        days = TimeUnit.MILLISECOND.convert(millis, TimeUnit.DAY);
    }
120326
public void setMinRate(double min)
    {
        if(min <= 0 || Double.isNaN(min) || Double.isInfinite(min))
            throw new RuntimeException("minRate should be positive, not " + min);
        this.min = min;
    }
1125960
public void setRetention(long duration, TimeUnit timeUnit) {
        this._duration = Math.max(1, duration);
        this._timeUnit = timeUnit;
        
        long millis = TimeUnit.MILLISECONDS == timeUnit ?
                _duration : TimeUnit.MILLISECONDS.convert(_duration, timeUnit);
        _timeMillis = Math.max(millis, MIN_DURATION_MILLIS);
    }
293892
private void timing(String metric, Date startDate) {
        m_logger.trace("Time for '{}': {}", metric,
                       ((new Date()).getTime() - startDate.getTime()) + " millis");
    }
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();
	}
982938
public function setTime($hours, $minutes, $seconds)
    {
      // Validate
      self::validateTime($hours, $minutes, $seconds);
      
      // Set internal hours, minutes, seconds and microtime variables
      $this->hours   = (int)$hours;
      $this->minutes = (int)$minutes;
      $this->seconds = (int)$seconds;
      
      if(is_float($seconds))
        $this->microtime = fmod($seconds, floor($seconds));
    }
1073336
private void setInactivityTimer(long ms) {
        if (sessionInactivityTimer == null) {
            sessionInactivityTimer = new SessionInactivityTimer(sessionHandler.getScheduler(), this);
        }
        sessionInactivityTimer.setIdleTimeout(ms);
    }
908454
def prepare_time_millis(data, schema):
    """"""
    if isinstance(data, datetime.time):
        return int(
            data.hour * MLS_PER_HOUR + data.minute * MLS_PER_MINUTE
            + data.second * MLS_PER_SECOND + int(data.microsecond / 1000))
    else:
        return data
432917
private void set_time()
	{
		if (date == true)
		{		
			Date d = new Date();
			
			long nb_millisec = d.getTime();
	
			when.tv_sec = (int)(nb_millisec / 1000);
			when.tv_usec = (int)((nb_millisec - (when.tv_sec * 1000)) * 1000);
			when.tv_nsec = 0;
		}
	}
795593
public void setTimewarpInt(String timewarp) {

        try {
            m_userSettings.setTimeWarp(Long.valueOf(timewarp).longValue());
        } catch (Exception e) {
            m_userSettings.setTimeWarp(-1);
        }
    }
766792
public static Calendar calendar(long millis) {
		final Calendar cal = Calendar.getInstance();
		cal.setTimeInMillis(millis);
		return cal;
	}
646260
public void setStart(ReadableInstant start) {
        long startMillis = DateTimeUtils.getInstantMillis(start);
        super.setInterval(startMillis, getEndMillis(), getChronology());
    }
990799
public void setOffsetMinutes(int theZoneOffsetMinutes) {
		int offsetAbs = Math.abs(theZoneOffsetMinutes);

		int mins = offsetAbs % 60;
		int hours = offsetAbs / 60;

		if (theZoneOffsetMinutes < 0) {
			setTimeZone(TimeZone.getTimeZone("GMT-" + hours + ":" + mins));
		} else {
			setTimeZone(TimeZone.getTimeZone("GMT+" + hours + ":" + mins));
		}
	}
77038
public void idle(final int milliseconds) {
		long startTime = System.currentTimeMillis();
		while((System.currentTimeMillis() - startTime) < milliseconds)
			try {
				Thread.sleep(Math.max(1, milliseconds - (System.currentTimeMillis() - startTime)));
			}
		catch(InterruptedException e) {
		}
	}