Barack has spent 3 years as a U.S. Senator, Abraham Lincoln was a U.S. Senator for 2 years before being elected president.
Both Lincoln and Obama have 10 years experience when you add in the years they spent in the Illinois Legislature.
Franklin Delano Roosevelt served as State Senator from New York for 2 years and Governor of New York for 4 years prior to being elected President.
Source - Time Magazine 3/10/08 - Does Experience Matter in a President?