The timeframe is dependent on the activity conducted:
Licensed manufacturers must mark non-NFA firearms it manufactures not later than the seventh day following the date the entire manufacturing process has ended for the weapon, or prior to disposition, whichever is sooner. See 478.92(a)(1)(vi)(A).
Licensed importers must mark imported firearms within 15 days of the date of release from Customs custody. Pursuant to §478.92, licensed importers must place all required identification data on each imported firearm if same did not bear such identification data at the time of its release from Customs custody. See 478.112(d)(2).
Licensees must mark privately made firearms (PMFs) acquired into inventory not later than seven (7) days of receipt or acquisition, or before date of disposition, whichever is sooner. 27 CFR 478.92(a)(2).
Licensed manufacturers must mark NFA firearms not later than close of the next business day following the date the entire manufacturing process has ended for the weapon or device, or prior to disposition, whichever is sooner. See 478.92(a)(1)(vi)(B).