WASHINGTON (CNN) -- A spending bill that funds the U.S. government for the rest of the budget year passed the Senate on Tuesday despite complaints about nearly $8 billion in what critics called "pork-barrel" projects. 

The Senate passes a bill to fund the government through the end of the fiscal year. 

Senators voted 62-35 to cut off debate on the $410 billion measure and passed it on a voice vote immediately afterward. 

The omnibus spending bill includes more than 8,000 congressional "earmarks," which total almost $8 billion. The earmarks have caused critics to question President Obama's pledge to end wasteful spending, but Obama administration officials said the bill is a holdover from the previous Congress. 

"It is in America's best interest to close the book on the last administration and let the new one hit the ground running," said Sen. Daniel Inouye, the Democratic chairman of the Senate Appropriations Committee. See where the money is going » 

But Sen. John McCain, a longtime critic of congressional spending and Obama's Republican opponent in the 2008 election, said the vote shows "business as usual" remained the order of the day. 

"If the president were serious about his pledge for change, he would veto this bill. He won't," McCain said. 

The bill funds the U.S. government through September, when the 2008 budget year ends. Senate Majority Leader Harry Reid, D-Nevada, postponed the vote last week because he wasn't sure supporters had the 60 votes needed to break a potential GOP filibuster. 

Republican critics, led by House Minority Leader John Boehner of Ohio, have urged Obama to veto the bill because of the earmarks, targeted spending provisions inserted by Democratic and Republican lawmakers. 
has McCain always been critical of too much spending?
But Sen. John McCain, a longtime critic of congressional spending