/** * @return Timestamp **/ public static function alignToSeconds(Timestamp $stamp, $seconds) { $rawStamp = $stamp->toStamp(); $align = floor($rawStamp / $seconds); return Timestamp::create($align * $seconds); }
/** * @return AMQPBaseMessage **/ public function setTimestamp(Timestamp $datetime) { $this->timestamp = $datetime; $this->properties[self::TIMESTAMP] = $datetime->toStamp(); return $this; }