Pixel 2 and Pixel XL 2 smartphones are announced a day back. Now the specification sheet shows that these new pixel phones will get three years support from google, for both OS update and secuirty patch update.
Last year Google Pixel smartphone announced that Pixel phones 2016 will get OS update for two years and three years for security patch updates. When comparing the iphone, time frame is not shared for the OS updates. All eligible devices(even 4year old) will receive the OS update and security updates.