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