src/Carbon/Traits/Boundaries.php
public function endOfSecond()
    {
        return $this->setTime($this->hour, $this->minute, $this->second, static::MICROSECONDS_PER_SECOND - 1);
    }
public function endOfSecond()
    {
        return $this->setTime($this->hour, $this->minute, $this->second, static::MICROSECONDS_PER_SECOND - 1);
    }
public function endOfSecond ( ) { return $ this -> setTime ( $ this -> hour , $ this -> minute , $ this -> second , static :: MICROSECONDS_PER_SECOND - 1 ) ; }
Modify to end of current second, microseconds become 999999

@example
```
echo Carbon::parse('2018-07-25 12:45:16.334455')
->endOfSecond()
->format('H:i:s.u');
```

@return static|CarbonInterface
Modify to end of current second microseconds become 999999