URGENT: Marriage Option?


Registered Users (C)
I am an H1-B worker and have just been laid off from my company a few days ago. I am worried that I might not find a job or companies will have trouble processing my new H1-B Visa because of my out of status situation. My boyfriend is a US citizen and I am considering marrying him in order to get back in status again. Will I have any problems filling for a permanent residency status?
How long does the green card processing takes from the time of filling? Any information/advice is much appreciated, thank you in advance.