Straw purchase and providing a firearm to a prohibited person are two completely separate acts that may occur separately from each other, by themselves, or together.
Straw purchase is buying a firearm with someone else's money and then providing them with the firearm in return for their money. It is completely inmaterial whether the person who finally receives the firearm is a prohibited person or not.
If you KNOWINGLY or have reasonable cause to believe that the person you are giving/selling/transferring a firearm to is a prohibited person, then you have committed a completely separate felony from a straw purchase regardless of whether that act occurred in conjunction with a straw purchase or not.
Transferring/selling/giving a rifle that you purchased with your own money without intention of receiving compensation from a particular person at the time of purchase is not a straw purchase irregardless of the time frame.