Get the current timestamp in milliseconds, UTC.
@return A timestamp in milliseconds
491067
protected static long getTime() {
        // Initialization
        if (deviceDateToServerDateUncertainty == Long.MAX_VALUE) {
            deviceDateToServerDateUncertainty = WonderPushConfiguration.getDeviceDateSyncUncertainty();
            deviceDateToServerDateOffset = WonderPushConfiguration.getDeviceDateSyncOffset();
        }
        long currentTimeMillis = System.currentTimeMillis();
        long elapsedRealtime = SystemClock.elapsedRealtime();
        long startupToDeviceOffset = currentTimeMillis - elapsedRealtime;
        if (startupDateToDeviceDateOffset == Long.MAX_VALUE) {
            startupDateToDeviceDateOffset = startupToDeviceOffset;
        }

        // Check device date consistency with startup date
        if (Math.abs(startupToDeviceOffset - startupDateToDeviceDateOffset) > 1000) {
            // System time has jumped (by at least 1 second), or has drifted with regards to elapsedRealtime.
            // Apply the offset difference to resynchronize the "device" sync offset onto the new system date.
            deviceDateToServerDateOffset -= startupToDeviceOffset - startupDateToDeviceDateOffset;
            WonderPushConfiguration.setDeviceDateSyncOffset(deviceDateToServerDateOffset);
            startupDateToDeviceDateOffset = startupToDeviceOffset;
        }

        if (startupDateToServerDateUncertainty <= deviceDateToServerDateUncertainty
                // Don't use the startup date if it has not been synced, use and trust last device date sync
                && startupDateToServerDateUncertainty != Long.MAX_VALUE) {
            return elapsedRealtime + startupDateToServerDateOffset;
        } else {
            return currentTimeMillis + deviceDateToServerDateOffset;
        }
    }
377607
public String getTimeStampStr()
    {
        if (_timeStampStr == null && _timeStamp > 0)
                _timeStampStr = HttpFields.__dateCache.format(_timeStamp);
        return _timeStampStr;
    }
880927
public String getMilliseconds() {
        if (myTimerIsRunning) {
            throw new IllegalStateException(LOGGER.getI18n(MessageCodes.UTIL_042));
        }

        return new StringBuilder().append(myStop - myStart).append(" msecs").toString();
    }
1258634
private static long getRawTimestamp(long timeMillis) {
        checkArgument(timeMillis >= TIME_MILLIS_MIN, "Time value too small.");  // < 12am Oct 15, 1582 (UTC)
        checkArgument(timeMillis <= TIME_MILLIS_MAX, "Time value too large.");  // > 9:21pm Mar 31, 5236 (UTC)
        return timeMillis * 10000 + NUM_100NS_INTERVALS_SINCE_UUID_EPOCH;
    }
451816
public static long epochNanos()
    {
        final Instant now = Instant.now();
        final long seconds = now.getEpochSecond();
        final long nanosFromSecond = now.getNano();

        return (seconds * 1_000_000_000) + nanosFromSecond;
    }
1091822
public com.google.protobuf.Timestamp getTimestampValue() {
    if (typeCase_ == 5) {
      return (com.google.protobuf.Timestamp) type_;
    }
    return com.google.protobuf.Timestamp.getDefaultInstance();
  }
1123340
def timestamp_with_timezone(dt=None):
    
    dt = dt or datetime.now()
    if timezone is None:
        return dt.strftime('%Y-%m-%d %H:%M%z')
    if not dt.tzinfo:
        tz = timezone.get_current_timezone()
        if not tz:
            tz = timezone.utc
        dt = dt.replace(tzinfo=timezone.get_current_timezone())
    return dt.strftime("%Y-%m-%d %H:%M%z")
1369444
public static String datetime(long millis) {
		if (sFormat == null) {
			sFormat = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"),
					US);
		}
		return sFormat.format(millis);
	}
731775
public @Nonnull String getTimestampString() {
        long duration = System.currentTimeMillis()-timestamp.getTime();
        return Util.getPastTimeString(duration);
    }
816812
@Override
   public float getAverageGetTime() {
      long unsupportedCacheGetTotalMillis = TimeUnit.NANOSECONDS.toMillis(unsupportCacheGetTotalTime.longValue());
      return TimeUnit.MILLISECONDS.toMicros(mapToSpecValidStat(
            cache.getStats().getAverageReadTime() + unsupportedCacheGetTotalMillis));
   }
163540
public static long todayEndSeconds(){
		Date curTime = new Date();
		return DateUtils.getDiffSeconds(DateUtils.getDayEnd(curTime), curTime);
	}
964955
public static double todaysDate()
    {
        java.util.Date date = new java.util.Date();
        m_calendar.setTime(date);
        m_calendar.set(Calendar.HOUR_OF_DAY, 0);
        m_calendar.set(Calendar.MINUTE, 0);
        m_calendar.set(Calendar.SECOND, 0);
        m_calendar.set(Calendar.MILLISECOND, 0);
        date = m_calendar.getTime();
        return date.getTime(); // Convert to double
    }
962418
function timestamp () {
  var now = new Date()
  var diff = now.getTimezoneOffset() + 480
  now = new Date(now.getTime() + diff * 60000)

  var year = now.getFullYear()
  var month = ('0' + (now.getMonth() + 1)).slice(-2)
  var day = ('0' + now.getDate()).slice(-2)
  var hour = ('0' + now.getHours()).slice(-2)
  var minutes = ('0' + now.getMinutes()).slice(-2)
  var seconds = ('0' + now.getSeconds()).slice(-2)

  var result = '' + year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
  debug(result)
  return result
}
805673
public static double currentTime()
    {
        java.util.Date time = new java.util.Date();
        m_calendar.setTime(time);
//x        m_calendar.set(Calendar.SECOND, 0);
        m_calendar.set(Calendar.MILLISECOND, 0);
        time = m_calendar.getTime();
        return time.getTime(); // Convert to double
    }
647030
def current_timestamp(self) -> datetime:
        """"""
        timestamp = DB.get_hash_value(self._key, 'current_timestamp')
        return datetime_from_isoformat(timestamp)
1110428
def __timestamp():
    """"""
    today = time.time()
    ret = struct.pack(b'=L', int(today))
    return ret
1247857
public static long epochMicros()
    {
        final Instant now = Instant.now();
        final long seconds = now.getEpochSecond();
        final long nanosFromSecond = now.getNano();

        return (seconds * 1_000_000) + (nanosFromSecond / 1_000);
    }