protected function setTimestamp($field, $timestamp, $now = false)
    {
        if ($timestamp === null && $now) {
            $this->{$field} = zipkin_timestamp();
            return null;
        }

        if (!is_zipkin_timestamp($timestamp)) {
            throw new \InvalidArgumentException($field . ' must be generated by zipkin_timestamp()');
        }

        $this->{$field} = $timestamp;
        return null;
    }